Cut the tomatoes into 1-inch pieces. If using grape or cherry tomatoes, leave them whole. Drizzle with olive oil, and season with salt and pepper.
Dice the eggplant into 1-inch cubes. Spread the eggplant cubes on a baking sheet, and drizzle generously with olive oil. Season with salt and pepper.
Roast the tomatoes and eggplants in the oven for about 35-40 minutes, or until the eggplant is softened and browned and the tomatoes are wrinkled and juicy. Halfway through roasting, switch the pans (so the top pan is on the bottom and vice versa), and stir the tomatoes and eggplant to ensure even browning.
Meanwhile, bring a large pot of salted water to a boil. Boil the spaghetti 1-2 minutes short of al dente.
While the pasta is cooking, heat 2-3 tablespoons of olive oil in a large skillet over medium heat, and add the garlic and chilies. Cook for 2-3 minutes. Add the tomato paste, and fry for another 2-3 minutes.
Add about ⅔ cup of the pasta cooking water, and stir in the roasted tomatoes and eggplant, along with the oregano. Season with salt and pepper.
Add the pasta to the mixture, along with about ½ cup of pasta water. Toss the pasta in the mixture over medium low heat for another 1-2 minutes, and keep adding water a ¼ cup at a time until the sauce is silky and coats the pasta.
Toss in the parsley and/or basil. Serve with ricotta salata (or pecorino or parmesan if that’s what you’ve got!)
NOTE: Nutrition info calculated based on using about ⅓ cup olive oil for this recipe.