In a Dutch oven or large pot, heat 2 tablespoons olive oil over medium-high until shimmering. Add eggplant and cook, stirring frequently, for 5 minutes until browned and softened; season with salt. (The eggplant will create a deep fond on bottom of pot—the vegetables and red wine will pull that up and add depth of flavor to the sauce.)
Transfer eggplant to a medium bowl; add remaining 2 tablespoons oil to Dutch oven.
Reduce heat to medium and add mushrooms, onion, carrot, and celery; season with salt. Cook, stirring occasionally, until vegetables are softened, 8–10 minutes. Add garlic, tomato paste, and red pepper flakes; cook 2 minutes, stirring frequently.
Deglaze pan with ¾ cup of wine; cook 1 minute. Add reserved eggplant, tomatoes, oregano, and thyme; season with salt and pepper. Bring sauce to a boil over high heat, then reduce to medium and simmer 10 minutes.
Meanwhile, bring a large pot of water to a boil; add a tablespoon of kosher salt and pasta. Cook pasta according to directions on package until al dente.
While pasta is cooking, add remaining wine and basil to sauce. Simmer for an additional 5–10 minutes. When ready, drain pasta and transfer to a large serving bowl, add desired amount of sauce and toss to combine. Top with additional basil, pine nuts, and Parmesan, if using.