Preheat the oven to 200°C (400°F).
In a large baking dish, add the cherry tomatoes and spread them out evenly. Drizzle with 2 tablespoons of olive oil and season with salt, black pepper, and red pepper flakes (if using).
Place the block of feta cheese in the center of the tomatoes. Drizzle the remaining 2 tablespoons of olive oil over the feta and sprinkle with a little more black pepper.
Bake in the preheated oven for about 30 minutes until the tomatoes are blistered and the feta is golden and soft.
While the feta and tomatoes are baking, cook the pasta according to the package instructions until al dente. Drain the pasta using a colander and set aside.
Once the feta and tomatoes are done baking, remove the dish from the oven. Add the minced garlic to the dish and stir everything together until the feta is creamy and combined with the tomatoes.
Toss the cooked pasta into the baking dish and mix well to coat the pasta with the creamy sauce.
Serve immediately, garnished with fresh basil leaves and optionally top with grated Parmesan cheese.