Preheat oven to 400°. In a large ovenproof skillet or medium baking dish, combine tomatoes, shallot, garlic, and all but 1 Tbsp. oil; season with salt and red pepper flakes and toss to combine.
STEP 2
Place feta into center of tomato mixture and drizzle with reserved 1 tsp. oil. Scatter thyme sprigs over tomatoes.
STEP 3
Bake until tomatoes are bursting and feta is golden on top, 40 to 45 minutes.
STEP 4
Meanwhile, in a large pot of boiling salted water, cook pasta, stirring occasionally, until al dente according to package directions. Reserve 1/2 cup pasta water before draining.
STEP 5
To skillet, add cooked pasta, reserved pasta water, and lemon zest (if using) and stir until combined. Top with basil.