Start by preparing the eggplants. Cut them into 1-inch cubes and sprinkle salt over them. Let them sit for about 10-15 minutes to draw out moisture and bitterness. Afterward, rinse and pat them dry with a paper towel.
Heat 25 ml (2 tbsp) of olive oil in a large frying pan over medium heat. Once hot, add the eggplant cubes in batches and sauté until golden brown and tender, about 5-7 minutes per batch. Remove them from the pan and set aside.
In the same frying pan, add the remaining 25 ml (1.5 tbsp) of olive oil. Sauté the chopped onion until translucent. Then, add the minced garlic and cook for an additional minute until it's fragrant.
Pour in the canned crushed tomatoes and add the dried oregano, salt, and black pepper. Let the sauce simmer for about 10-15 minutes, allowing the flavors to meld together.
While the sauce is simmering, cook the pasta in a large pot of salted boiling water according to package instructions until al dente. Reserve about 1 cup of pasta cooking water before draining the pasta in a colander.
Add the sautéed eggplant to the tomato sauce and stir to combine. If the sauce is too thick, add a small amount of reserved pasta cooking water to reach the desired consistency.
Toss the drained pasta directly into the sauce, mixing well to coat the pasta evenly. Cook for an additional 2 minutes over low heat, allowing the pasta to absorb the sauce.
Serve hot, garnished with grated ricotta salata cheese and fresh basil leaves.