In a mixing bowl, combine flours, salt and pepper. Set aside.
In the bowl of a stand mixer fitted with a dough hook attachment, add ricotta, Pecorino Romano PDO, egg, and 1 tablespoon water. Slowly incorporate flour mixture and mix 5 minutes on medium-low speed, or until dough comes together.
When no dry ingredients remain, transfer dough to a clean work surface. Knead until dough is smooth and elastic. If the dough is sticky or wet, dust with flour. Let rest 30 minutes at room temperature, then roll out and run through a cavatelli pasta machine of your choice. Reserve.
Heat oven to 300°F. On a work surface, generously season eggplant with salt and let sit 30 minutes at room temperature.
Transfer eggplant to a hot pan with all remaining ingredients. Roast 30 minutes. Let cool, then transfer to an airtight container with oils and reserve.
Bring a pot of salted water to a boil. Add Cavatelli and cook 2 minutes, or until Cavatelli floats in the water. Strain, reserving pasta water. Set aside.
In a saucepan over medium heat, warm 2 ounces Eggplant Confit. Add chile flakes and marinara sauce. Once warmed through, add cooked Cavatelli, a splash of reserved pasta water, and fresh basil. Stir until the sauce has fully emulsified.
Fold in Pecorino Romano PDO, then transfer to a serving bowl and serve.
