01 - Preheat the oven to 400°F.
02 - In a large ovenproof baking dish, combine cherry tomatoes, sun-dried tomatoes, garlic, and 2 tablespoons olive oil. Season generously with salt, pepper, dried oregano, and optional red pepper flakes. Toss to mix evenly.
03 - Position the feta block in the center of the dish among vegetables. Drizzle 1 tablespoon olive oil over the cheese and season lightly with black pepper.
04 - Bake for 25 to 30 minutes until the tomatoes burst and feta is soft and lightly golden at the edges.
05 - While baking, heat a large skillet over medium heat. Add 1 tablespoon olive oil and sliced onions. Cook, stirring occasionally, for 15 to 20 minutes until deeply caramelised and golden brown. Set aside.
06 - While onions caramelise, cook pasta according to package directions in salted boiling water until al dente. Reserve 1/2 cup pasta water and drain the rest.
07 - After baking, remove the dish from the oven. Add caramelised onions and chopped basil. Stir thoroughly, breaking up the feta to create a creamy sauce.
08 - Add cooked pasta to the baking dish and toss to coat. Gradually add reserved pasta water to adjust sauce consistency as desired.
09 - Serve immediately with extra basil and an optional drizzle of olive oil.