01 -  Set oven temperature to 400°F. 
 02 -  In a large ovenproof baking dish, combine halved cherry tomatoes, sliced sun-dried tomatoes, garlic, and 2 tablespoons olive oil. Season with salt, freshly ground black pepper, dried oregano, and crushed red pepper flakes if using. Toss ingredients thoroughly. 
 03 -  Position the block of feta among the seasoned vegetables and drizzle with 1 tablespoon olive oil. Sprinkle lightly with black pepper. 
 04 -  Transfer dish to oven and bake for 25 to 30 minutes, until tomatoes are bursting and feta is softened with golden edges. 
 05 -  Meanwhile, heat a large skillet over medium heat. Add 1 tablespoon olive oil and the sliced onions. Cook, stirring frequently, for 15 to 20 minutes until onions are deeply caramelised and richly browned. Set aside. 
 06 -  While onions are cooking, prepare pasta in a large pot of salted boiling water according to package directions 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 directly to the dish. Stir gently to break up feta and incorporate all ingredients into a creamy sauce. 
 08 -  Integrate drained, cooked pasta into the sauce mixture, tossing well to coat. Adjust sauce texture with reserved pasta water as needed, adding gradually until desired consistency is reached. 
 09 -  Divide pasta among plates and garnish with additional fresh basil and an extra drizzle of olive oil, if desired. Serve immediately.