In a large skillet, heat 1/4 cup oil over medium-high. Add half the eggplant; cook, stirring often, until browned, 8 minutes. Transfer to a bowl. Repeat with 1/4 cup oil and the remaining eggplant; season with salt and pepper.
Bring a large pot of water to a boil. Salt the water; cook pasta to al dente. Reserve 1 cup cooking water; drain.
In the skillet, heat 2 tbsp. oil over medium. Add the onion, anchovies, garlic and the spices; cook, stirring often, until tender, about 8 minutes. Add tomatoes and 1/2 cup pasta cooking water. Simmer, breaking up the tomatoes with a wooden spoon, until flavors meld, 15 minutes. Add more pasta water if too thick. Stir in the eggplant and pasta.
Drizzle each serving with oil and top with ricotta salata, if using, and basil.