Preheat the oven to 350 degrees F. Peel the eggplants lengthwise in 1-inch intervals to create stripes. Slice each eggplant crosswise into 1/2-inch-thick rounds then cut each round into 1/2-inch dice.
Heat 3 tablespoons of the oil in a large skillet over high heat until it begins to shimmer. Add half of the eggplant and season with salt and pepper; cook, stirring constantly, until the eggplant takes on some color and becomes soft, about 5 minutes. Transfer the eggplant to a rimmed baking sheet and spread in an even layer. Repeat with another 3 tablespoons of oil and the remaining eggplant.
Transfer the eggplant to the oven and bake until very soft, stirring or flipping once, about 15 minutes. Remove from the oven and let cool on a wire rack.
While the eggplant bakes, heat the remaining 2 tablespoons of oil in a Dutch oven over high heat. Add the onion, carrots and celery and cook, stirring often, until soft, about 5 minutes. Add the garlic and cook, stirring, for 30 seconds. Add the chile flakes and cook, stirring again, for another 30 seconds.
Stir in the wine, bring to a boil and cook until completely reduced, about 5 minutes. Add the tomatoes and sugar, bring to a boil, reduce heat to medium and cook until the tomatoes begin to soften and break down, about 15 minutes. Using a potato masher, coarsely mash the tomatoes and let cook, stirring occasionally, until the sauce has thickened, about 15 minutes longer.
Fold the eggplant, basil and oregano into the sauce. Add the pasta and some of the Parmigiano-Reggiano; toss to coat with the sauce, adding some of the reserved pasta water, as needed, to thin the sauce. Season with salt and pepper. Transfer to shallow bowls and serve, passing the remaining Parmigiano at the table.