Preheat oven to 400°F (200°C).
In a baking dish, place the block of feta cheese in the center.
Add cherry tomatoes, minced garlic, and red pepper flakes around the cheese.
Drizzle with olive oil and season with salt and pepper.
Bake for 20-25 minutes or until the cheese is melted and the tomatoes are soft.
Meanwhile, cook pasta according to package instructions.
Reserve 1/2 cup of pasta water.
Drain pasta and add it to the baking dish with the baked feta cheese and tomatoes.
Toss to combine and add reserved pasta water to loosen, if needed.
Serve hot and garnish with fresh basil leaves (optional).