Preparation Preheat 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. Whisk eggs and tomato paste in a medium bowl until smooth, then whisk in about three-quarters of Parmesan. Cook 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. Add cooled vegetable mixture to pot with pasta. Wipe out skillet and drizzle in a little oil; roll around in skillet to coat. Add egg mixture to pasta and toss vigorously with tongs until pasta is evenly coated. Add capers and 1/2 cup basil and toss again to combine. Transfer pasta mixture to skillet and press gently into an even layer. Top with remaining Parmesan, a few whole basil leaves, and an extra sprinkle of red pepper flakes. Bake pasta until surface is nicely browned, 30–35 minutes. Let cool 10 minutes before cutting into wedges for serving.
Preparation Preheat 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. Whisk eggs and tomato paste in a medium bowl until smooth, then whisk in about three-quarters of Parmesan. Cook 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. Add cooled vegetable mixture to pot with pasta. Wipe out skillet and drizzle in a little oil; roll around in skillet to coat. Add egg mixture to pasta and toss vigorously with tongs until pasta is evenly coated. Add capers and 1/2 cup basil and toss again to combine. Transfer pasta mixture to skillet and press gently into an even layer. Top with remaining Parmesan, a few whole basil leaves, and an extra sprinkle of red pepper flakes. Bake pasta until surface is nicely browned, 30–35 minutes. Let cool 10 minutes before cutting into wedges for serving.