01 - Heat oven to 400°F (200°C).
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, oregano, and red pepper flakes if using. Toss thoroughly to coat.
03 - Place block feta cheese in center of baking dish, nestling it among tomatoes. Drizzle 1 tablespoon olive oil over feta and season lightly with black pepper.
04 - Transfer baking dish to oven. Bake for 25 to 30 minutes, until tomatoes are bursting and feta is soft and golden on 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 onions are deeply caramelised and golden brown. Set aside.
06 - Meanwhile, cook pasta in a large pot of salted boiling water until al dente, following package instructions. Reserve 1/2 cup pasta water, then drain pasta.
07 - Remove baking dish from oven. Add caramelised onions and chopped basil to dish. Using a wooden spoon, stir and blend contents, breaking up feta to create a creamy sauce.
08 - Add drained pasta to baking dish. Toss thoroughly to coat with sauce. If sauce is too thick, gradually add reserved pasta water until desired consistency is reached.
09 - Serve pasta immediately, garnished with extra fresh basil and an additional drizzle of olive oil if desired.