Make a quick tomato sauce: Put 2 Tablespoons of olive oil in a large, deep skillet over medium-high heat. Add onions, season with salt and pepper, and cook, stirring occasionally, until softened, about 10 minutes.
Stir in garlic, red pepper, and basil leaves and cook for 1 minute. Add tomatoes, stir, and bring to a simmer. Reduce heat to low and let the sauce simmer gently for 20 minutes until slightly thickened. Taste and adjust seasoning. Set aside. (Sauce may be prepared up to 2 days in advance.)
Meanwhile, bring a large pot of well-salted water to a boil. Then, reduce the heat to low and cover the pot until the pasta is ready.
Put a wide cast-iron pan over medium-high heat. Add 4 Tablespoons olive oil to coat the surface of the pan. When the oil is wavy, test by adding a cube of eggplant. It should begin to sizzle and brown immediately. Fill the pan with a single layer of eggplant cubes. Turn the eggplant cubes on all sides with a spatula or tongs and brown nicely. Lower the heat as necessary to maintain an even temperature; if the pan is too hot, the eggplant will burn.
Remove the cooked eggplant to a plate and fry the remaining eggplant in batches, adding more oil as necessary. Season the finished eggplant with salt and pepper. You can also roast the eggplant on a baking sheet at 400 degrees. Drizzle it lightly with oil and roast until it is cooked and browned, which takes about 20 minutes.
To assemble and serve, boil the pasta until al dente, leaving it a little firmer than normal. Bring the tomato sauce to a simmer. (Save the fried eggplant until the very end when you’re ready to serve.) Reserve a cup of cooking water, drain the pasta, and add the pasta to the sauce. Using 2 wooden spoons or tongs, toss the pasta and sauce and let it cook for 1 minute more—thin the sauce if necessary, with some of the reserved cooking water.
Mix in the fried eggplant cubes.
Transfer to a warmed wide pasta bowl. Sprinkle with grated ricotta salata and bread crumbs.
Garnish with torn or whole basil leaves and a drive of olive oil.