1Preheat oven to 425°F. Combine eggplant, tomatoes, garlic, 1/4 cup oil, and 1/2 tsp. red pepper flakes in a large ovenproof skillet, preferably cast iron. Season generously with salt and toss to combine. Roast, shaking skillet once or twice, until eggplant is tender and tomatoes burst, 25–35 minutes. Let vegetables cool while you prepare the pasta (watch out for the hot handle when you take the skillet out of the oven). Reduce oven temperature to 400°F.
3Cook spaghetti in a pot of boiling salted water, stirring occasionally, until al dente. Immediately drain pasta in a colander and shake to remove excess water; transfer pasta back to pot.