Preheat oven to 400° and line 2 baking sheets with parchment paper.
Cut eggplants into ⅝-inch slices, then cut into eight wedges. Arrange eggplants in a single layer on a prepared baking sheet and drizzle 2 tablespoons olive oil. Bake for 30-35 minutes. After 20 minutes, toss the eggplants and continue baking for another 10-15 minutes. Repeat with the remaining eggplants using another 2 tablespoons olive oil.
Arrange cherry tomatoes on the second prepared baking sheet, drizzle with 2 teaspoons olive oil and bake for 20-25 minutes.
Heat 2 teaspoons olive oil in a large cast iron skillet over medium heat. Once the oil is hot, add the onions and sauté until softened.
Add the garlic, tomato paste, oregano, and sugar; stir until well combined. Pour in the wine and simmer for 1–2 minutes. Stir in the roasted tomatoes and red pepper flakes, then simmer for another 1–2 minutes.
Fold in the roasted eggplants and season with salt to taste. Transfer to a serving platter. Top with dollops of whipped ricotta and garnish with fresh basil.