Preheat the oven to 400 degrees F. Line a baking tray with parchment paper and keep it aside.
Cook the rigatoni pasta according to the package instructions in salted water minus 2 minutes. Reserve 1 cup of pasta cooked water and drain the remaining water and keep the cooked pasta aside.
Add the eggplant pieces along with the 3 tablespoons of olive oil, salt and pepper on the parchment paper. Massage the eggplants to coat the oil evenly. Roast the eggplants for 20-25 minutes flipping them halfway through.
Heat a heavy bottom dutch oven on a medium flame with a tablespoon of olive oil. Add in the garlic and chopped onions. Cook until the onion turns translucent.
Add in the diavolo sauce and cook for 5-7 minutes. Add in the spices; Italian seasonings, red chili flakes, salt and pepper. Allow the sauce to simmer for 2 more minutes and add the basil leaves.
Reserve ¼ cup of sauce for later use and add the cooked pasta in sauce and if needed add the reserved water pasta water.
Spread the reserved ¼ cup of sauce over a 9X13 casserole dish at the bottom. Add a layer of pasta over the sauce. Add in the half portion of roasted eggplant over the pasta layer followed by 1 cup of mozzarella cheese and ½ cup of parmesan cheese layer. Repeat the same again; remaining pasta, roasted eggplant layer, ending with the spread of remaining cheese.
Bake them for 20-25 minutes until the cheese is melted and bubbly.
Once done, garnish the dish with freshly chopped parsley and basil on top and serve.