01 - Set oven to 400°F (200°C) and allow to fully heat.
02 - In a large ovenproof baking dish, combine halved cherry tomatoes, sun-dried tomatoes, sliced garlic, and 2 tablespoons olive oil. Season robustly with salt, pepper, dried oregano, and red pepper flakes if using. Toss to evenly coat.
03 - Nestle the block of feta into the center of the dish among the vegetables. Drizzle with 1 tablespoon olive oil and season lightly with black pepper.
04 - Transfer dish to the oven and bake for 25 to 30 minutes, until tomatoes have burst and feta is soft with lightly 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 deep golden brown and deeply caramelized. Set aside.
06 - As onions caramelise, cook pasta according to package directions in a large pot of salted boiling water until al dente. Reserve 1/2 cup pasta cooking water, then drain pasta.
07 - Remove baking dish from oven. Add caramelised onions and chopped basil. Mix well, breaking up feta to create a creamy, well-incorporated sauce.
08 - Toss cooked pasta into the baking dish. Mix to coat evenly; add reserved pasta water, a little at a time, until a smooth, silky consistency is reached.
09 - Serve immediately, garnished with extra basil and an optional drizzle of olive oil.