Preheat the oven to 400 degrees Fahrenheit.
On a baking sheet, toss the cubed eggplant with ¼ cup of olive oil, kosher salt, and black pepper. Spread them out in a single layer and bake for 20 minutes.
Meanwhile, start boiling the pasta according to the package instructions until al dente. Drain the pasta and set it aside.
Next, take a large pan and pour in olive oil. Set the stove to medium heat.
Once the oil is heated up, add chopped onions and sauté until translucent. This will take 3 to 5 minutes.
Add the sliced garlic and sauté for 2 minutes or until lightly golden in color.
Add the cherry tomatoes to the pan and let it cook for 5 to 8 minutes until they start softening.
Sprinkle in red pepper flakes and sauté for 30 seconds.
Pour in the plum tomatoes and gently simmer the sauce until it thickens.
Next, add the roasted eggplants and pasta to the sauce.
Cook for a minute and toss until combined.
Season the sauce with salt and pepper to taste.
Lastly, remove it from the heat and sprinkle grated Pecorino Romano cheese on top.
Garnish with basil and serve immediately.