Cook pasta in boiling salted water until al dente, then drain.
Preheat grill or cast iron pan. Coat eggplant slices with 1-2 tbsp oil, season with salt and pepper, then grill 2-3 minutes per side until tender and grill marks appear.
In a pan, heat 1-2 tbsp oil, add garlic and cook 30 seconds. Add tomato sauce with basil, chili flakes, and simmer for 5 minutes.
Mix grilled eggplant into sauce, then add half of the ricotta cheese and cooked pasta, gently combining.
Divide pasta among bowls, top with remaining ricotta, basil pesto, and garnish with fresh basil or parsley. Drizzle with olive oil if desired.
Notes
Use fresh basil for best flavor and adjust chili flakes to taste.