In a large baking dish, toss eggplant, tomatoes, olive oil, tomato paste and anchovies until combined. Season with salt and pepper. Nestle in the garlic heads and drizzle garlic with a touch more olive oil.
Bake for 45-60 minutes until tomatoes are burst, and eggplant and garlic are soft. If mixture seems dry during cooking, add a drizzle more olive oil.
When vegetables are almost done roasting, bring a large pot of water to a boil. Heavily season with salt.
Remove vegetables from the oven and carefully squeeze garlic from its skin (be careful it will be hot!). Add in red pepper flakes. Gently mash tomatoes, garlic and eggplant until slightly mashed but still quite chunky.
Drop pasta in boiling water and cook until al dente. Reserve a mug of pasta water, and drain.
Return pasta to the pot and add in sauce and a touch of pasta water. Toss.
Add in grated cheese and continue to toss to combine. Add in more pasta water as necessary to create a silky, cohesive sauce.
Toss in parsley and a drizzle more olive oil. Season with more salt if necessary.
Serve topped with ricotta salata, a drizzle of olive oil, parsley and grated pecorino if desired. Mmmmmmm