In a small pot over high heat, heat 1 cup water just until boiling. Remove from heat and add 1/2 cup cashews. Cover and let soak 1 hour.
Drain soaked cashews, discarding soaking liquid, and thoroughly rinse. Transfer to a blender and add 1/2 cup water and 1/8 teaspoon salt. Blend until smooth, then transfer to a small container (you should have about 3/4 cup cashew cream).
Bring a large pot of water to a boil and stir in 2 tablespoons salt. Add penne and cook, stirring occasionally, until very al dente, 2 to 3 minutes less than package instructions. Drain pasta, reserving 1 1/2 cups pasta cooking liquid.
Meanwhile, in a large, high-sided skillet, combine 1 tablespoon oil, 1/8 teaspoon red pepper flakes, 1/8 teaspoon salt, and remaining 1/4 cup cashews. Toast over low heat, tossing frequently, until fragrant, 4 to 5 minutes. Transfer to a small bowl; set aside. Wipe out skillet.
In same skillet, heat remaining 2 tablespoons oil. Add onion, garlic, and 1/2 teaspoon salt and cook, stirring occasionally, until onions are softened, 5 to 7 minutes. Add tomato paste, sun-dried tomatoes, and remaining 1/4 teaspoon red pepper flakes and cook, stirring constantly, until paste darkens and starts to stick to bottom of pot, 3 to 4 minutes.
Whisk in 3/4 cup cashew cream and 3/4 cup reserved pasta cooking liquid until combined, then bring to a simmer over medium-high heat. Add pasta and cook, tossing constantly and adding more pasta cooking liquid 1/4 cup at a time as needed, until pasta is al dente and sauce is glossy and coats pasta, 2 to 3 minutes; season with remaining 1/2 teaspoon salt as needed.
Divide pasta among bowls. Using a microplane, finely grate reserved toasted cashews over pasta. Top with basil.