Preheat the oven to 180C. Spread pumpkin on 1-2 lined baking trays, drizzle with a little oil and bake for 20 minutes or until golden.
Meanwhile, cut the crusts off the slices of sourdough (set aside crusts and reuse for breadcrumbs). Arrange crustless bread along the bottom and sides of a 20cm pie pan to form a 'pie crust'. Place a heavy saucepan on the bread in the pie pan to weigh it down and set aside.
Saute garlic and onion in a little oil in a fry pan until cooked.
Add garlic, onion, drained cashews, milk and salt into a blender and blend until smooth and thick. Add ½ cup of baked pumpkin into cashew cream then blend again.
Wilt spinach in fry pan.
In a large bowl, add baked pumpkin, cashew cream and wilted spinach and mix until just combined. Remove heavy saucepan from the pie pan and pour creamy mixture over bread. Arrange cherry tomatoes on the top of the pie.
Brush remaining olive oil on the edges of the sourdough crust.
Bake pie for 30-40 minutes or until a knife can be inserted into the middle of the pie and the cashew cream left on the knife is thick and can hold shape. The middle of the pie will always stay moist but we want the oven to remove a lot of the moisture so the pie can keep shape. If the top of your pie is browning and the middle isn't cooked yet, gently cover pie with aluminium foil.
Eat immediately or store leftovers in an airtight container in the fridge for up to 5 days. Reheat leftovers in oven for 5-10 minutes so the bottom of the pie is crispy.