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, black pepper, dried oregano, and crushed red pepper flakes if using. Toss thoroughly to coat.
03 - Nestle the feta block in the center of the tomato mixture. Drizzle with 1 tablespoon olive oil and season lightly with pepper.
04 - Bake for 25 to 30 minutes until tomatoes burst and feta softens with golden 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 - Meanwhile, cook pasta in a large pot of salted boiling water according to package instructions until al dente. Reserve 1/2 cup pasta water, then drain the pasta.
07 - Remove baking dish from oven. Add caramelised onions and chopped basil. Stir gently to combine, breaking up the feta to form a creamy sauce.
08 - Add cooked pasta and toss to coat evenly in the sauce. Gradually add reserved pasta water as needed until desired consistency is achieved.
09 - Serve immediately, garnished with extra fresh basil and a drizzle of olive oil if desired.