Preheat the oven to 400°F (200°C) or 350°F (180°C) fan-forced.
Cook the pasta according to the package instructions minus 2 minutes.
In a large bowl, mix together the ricotta, mozzarella, half the parmesan, the spinach, lemon zest, garlic, salt, and pepper.
Drain the pasta and add it to the ricotta mixture, mixing with a wooden spoon until well combined.
Spoon 1/2 cup of the tomato sauce into the base of a large baking dish.
Add the cheesy pasta mixture to the dish, then dollop spoonfuls of the pesto evenly on top.
Pour the remaining pasta sauce over the pesto and pasta mixture.
Sprinkle the top with the breadcrumbs and the remaining parmesan cheese.
Spray the topping generously with olive oil and bake for 10–12 minutes until golden brown.
Turn the oven to grill (broil) and cook for a further 1–2 minutes, or until the top is extra crispy.
Serve immediately drizzled with olive oil and a sprinkle of chili flakes (if using).