Preheat the oven to 400°F.
In a baking dish, add cherry tomatoes, rosemary, garlic, onion, feta, extra virgin olive oil, salt, black pepper, and red pepper flakes. Using your hands, mix to coat with seasonings.
Place in the oven and bake for 30-40 minutes, until tomatoes have burst and the feta is golden brown.
As it bakes, cook your pasta according to the package instructions. Drain water, retaining about 1/2 cup of pasta water.
Remove from the oven and add torn basil leaves. Using a spoon, combine into a sauce, adding a splash of reserved pasta water as needed.
Add pasta and stir until combined.
Serve warm and enjoy!