Heat the oven to 400°F.
Add the eggplant, zucchini, bell peppers, tomatoes, onion, garlic, and thyme to a 9x13-inch or other 3-quart baking dish. Drizzle with the balsamic and 3 tablespoons of the oil and season with the salt and several grinds black pepper. Toss to coat.
Roast until the vegetables are tender and browned and beginning to release their juices, 45 to 50 minutes. Give them a stir, then nestle the feta into the center of the baking dish, making sure it’s touching the bottom. Drizzle the whole dish with the remaining 1 tablespoon oil and top the feta with the red pepper flakes.
Return to the oven for another 40 to 50 minutes. Halfway through, give the veggies a stir, but don’t touch the feta. You’ll know it’s ready when the feta is soft and the juices are thick and bubbly.
Meanwhile, bring a large pot of salted water to a boil. Cook the pasta according to package directions for al dente. Reserve 1 cup of the cooking water, then drain the pasta.
Mash the feta with the back of a wooden spoon and stir it into the vegetables. Stir in the cooked pasta and as much of the reserved pasta water as needed to create a creamy sauce (likely 1/2 cup). Stir in the basil.