Preheat your oven to 400°F (200°C). In a 9x13-inch baking dish, add cherry tomatoes, garlic, olive oil, salt, pepper, and red pepper flakes (if using). All of the ingredients should be mixed together until the tomatoes are evenly coated.
Place the block of feta cheese in the center of the baking dish, nestling it among the tomatoes. Drizzle a little olive oil directly over the feta. Bake uncovered for 30–35 minutes, or until the tomatoes have burst and the feta is soft and golden.
While the feta and tomatoes are baking, cook your pasta according to package instructions until al dente. Reserve about ½ cup of pasta water, then drain and set aside.
Remove the baking dish from the oven. Use a spoon or fork to mash the feta and tomatoes together until they form a creamy, blended sauce. Add the cooked pasta and a splash of the reserved pasta water to loosen the sauce and help it coat the noodles.
Add basil leaves to the pasta by tearing them and sprinkling them over the pasta. Taste and adjust seasoning with extra salt, pepper, or olive oil if desired. Serve hot, with optional Parmesan cheese or lemon zest for brightness.