Preheat the oven to 400°F Peel away half the eggplant skin in stripes, leaving some for texture. Cut the eggplant into ½-inch cubes. Toss the eggplant cubes with a generous pinch of salt and place them in a colander over the sink or a bowl. Let them drain for 20–30 minutes to draw out excess moisture and bitterness.
In a baking dish, combine the cherry tomatoes, whole garlic cloves, ¼ cup olive oil, and a pinch of salt. Nestle the garlic under the tomatoes to prevent burning. Roast for 30–35 minutes until the tomatoes are blistered and the garlic is soft and caramelized.
While the tomatoes roast, pat the eggplant dry thoroughly with paper towels. Spread the cubes on a cookie sheet, toss with 2 tablespoons of olive oil and a little black pepper. Roast for 20–25 minutes until golden and browned.
Bring a large pot of salted water to a boil. Cook the pasta until al dente according to package instructions. Reserve ½ cup of pasta water before draining.
Let the roasted tomatoes and garlic cool slightly. Then, using a fork, carefully poke and smash them in the baking dish until it becomes a chunky, saucy mixture. Be careful—they may splatter if too hot.
Add the cooked pasta to a large serving bowl. Top with roasted eggplant, mascarpone, Parmesan, the smashed tomato-garlic mixture, and a splash of pasta water. Toss gently to combine, adding more pasta water as needed until the sauce is glossy and coats the noodles. Optional: add crushed red pepper flakes.
Fold in fresh basil and serve with more Parmesan, a drizzle of olive oil, and freshly cracked black pepper.