01 - Set the oven temperature to 400°F.
02 - In a large ovenproof baking dish, combine the cherry tomatoes, sun-dried tomatoes, garlic, and 2 tablespoons of olive oil. Season well with salt, pepper, oregano, and red pepper flakes if using. Toss thoroughly.
03 - Place the feta cheese block in the center of the prepared baking dish, nestling it among the vegetables. Drizzle 1 tablespoon olive oil over the feta and season lightly with black pepper.
04 - Transfer the baking dish to the oven and bake for 25 to 30 minutes until the tomatoes have burst and the feta is soft with golden edges.
05 - While baking, heat a large skillet over medium heat. Add 1 tablespoon olive oil and the sliced onions. Cook, stirring occasionally, for 15 to 20 minutes until deeply caramelised and golden brown. Set aside.
06 - Simultaneously, cook the pasta in a large pot of salted boiling water following package directions until al dente. Reserve 1/2 cup pasta water and then drain.
07 - Once baking is complete, remove the dish from the oven. Add the caramelised onions and chopped basil. Stir well to break up the feta and blend the sauce thoroughly.
08 - Add the cooked pasta to the dish and toss well to coat. Gradually add reserved pasta water for desired sauce consistency. Serve immediately with a generous sprinkle of fresh basil and an extra drizzle of olive oil if preferred.