Bring a large pot of salted water to a rolling boil.
Cut the ends of the eggplant and then cut in half, lengthwise. Cut again (lengthwise) if a large eggplant. Slice into pieces no large than a piece of rigatoni.
Place the eggplant in a colander that has been placed in a large bowl or your sink. Liberally sprinkle salt all over the eggplant piece and let them rest for 45 minutes to 1 hour. Rinse thoroughly with water to remove the salt. Pat dry with paper towels.
Heat 2 tbsp of the extra-virgin olive oil over medium-high heat in a large skillet. Add the eggplant and cook, stirring often, until softened and lightly browned in spots, about 10 minutes. Transfer to a plate and set aside.
Heat the remaining 2 tablespoons of olive oil in a large skillet over medium-high heat.
Add the pasta to the boiling water and immediately add the onion to the skillet and saute until tender, about 4½ minutes. Add the garlic and cook for another 30 seconds.
Add the tomatoes (crushed by hand) and the juices. Season with 2 tsp of salt and ½ tsp black pepper. Bring the tomatoes to a low simmer and cook until the pasta has reached al dente.
Drain the pasta and transfer it to a large pasta bowl or platter. Pour the tomato sauce over the pasta and stir to fully coat. Stir in ⅔ of the eggplant, all of the grated pecorino-romano (or parmesan), half of the ricotta selata, and the basil (leave a little for garnish). Gently stir until well combined.
Alternatively, leave the sauce in the skillet and add the pasta along with the other ingredients (as described in the previous step). Stir until fully combined.
Serve at once. Garnish with the remaining ricotta selata, eggplant, and basil on top.
