Heat the oven: Set to 400°F (200°C).
Line a large baking dish or sheet pan with parchment for easier cleanup.
Build the roasting base: Add tomatoes, sliced garlic, and red onion (if using) to the pan. Drizzle with 1–2 tablespoons olive oil, sprinkle with oregano, red pepper flakes, salt, and pepper. Toss to coat.
Nestle the feta: Place the whole block of feta in the center of the tomatoes.
Drizzle the top with a little olive oil and a pinch of pepper.
Add the chicken: Season chicken pieces with salt and pepper. Arrange them in a single layer around the feta, mixing them into the tomatoes so they pick up the flavors.
Roast: Bake for 20–25 minutes, until the tomatoes have burst and the chicken is cooked through (internal temp 165°F/74°C). If you like some char, broil for 1–2 minutes at the end.
Cook the pasta: While the pan is in the oven, boil the pasta in salted water until just al dente.
Reserve 1 cup of the starchy pasta water before draining.
Make it creamy: Remove the pan from the oven. Add spinach to the hot pan, then use a spoon to mash the feta and tomatoes into a creamy sauce. The residual heat will wilt the greens.
Toss it all together: Add the drained pasta, lemon zest, and half the basil.
Pour in 1/3–1/2 cup pasta water and toss until glossy and saucy. Add more water as needed to loosen.
Finish and serve: Squeeze in lemon juice to taste, adjust salt and pepper, and drizzle with a touch of olive oil if desired. Top with the remaining basil.