Preheat the oven to 400°F.
Rinse and dry the cherry tomatoes. Mince the garlic and chop the basil. Bring a large pot of salted water to a boil.
Place the block of feta cheese in the center of a 9x13 inch oven-safe baking dish. Arrange the cherry tomatoes around the feta.
Drizzle olive oil over the feta and tomatoes, then sprinkle with minced garlic, red pepper flakes (if using), salt, and pepper. Toss the tomatoes gently to coat, keeping the feta intact.
Bake for about 25 minutes until tomatoes burst and caramelize and feta softens with a golden top. Check after 20 minutes to avoid burning.
While the feta and tomatoes bake, cook the pasta in boiling salted water according to package directions until al dente. Reserve 1 cup of the pasta water, then drain.
Remove the baking dish from the oven. Mash the softened feta and burst tomatoes together to create a sauce.
Add the cooked pasta to the baking dish and pour in 1/2 cup reserved pasta water. Stir well to coat, adding more pasta water if needed to loosen the sauce.
Sprinkle chopped basil over the pasta, stir gently, taste, and adjust salt and pepper as desired. Serve immediately.