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 with salt, pepper, oregano, and red pepper flakes if desired. Toss well.
03 - Position the feta block in the center of the dish among the tomatoes. Drizzle with 1 tablespoon olive oil and sprinkle lightly with black pepper.
04 - Bake for 25–30 minutes, until tomatoes burst and feta cheese is golden and softened.
05 - While baking, heat a large skillet over medium heat. Add 1 tablespoon olive oil and sliced onions. Stir occasionally and cook for 15–20 minutes, until deeply caramelised and golden brown. Set aside.
06 - During onion caramelisation, cook pasta in a large pot of salted boiling water until al dente following package directions. Reserve 1/2 cup pasta water and drain.
07 - Remove baking dish from oven. Add caramelised onions and chopped basil to the dish. Stir thoroughly, breaking up feta to create a creamy sauce.
08 - Add cooked pasta to the dish and toss until evenly coated. Incorporate reserved pasta water as needed for desired sauce texture.
09 - Plate immediately, garnishing each serving with fresh basil and drizzling olive oil if desired.