Fry onion and garlic in 1 tsp olive oil in a medium saucepan over a low heat for 3 minutes. Add mashed pumpkin and most of the roasted chopped pistachios (reserving around one tablespoon for the topping) and season with salt & pepper. Stir and cook for a further 2 minutes. Remove from heat.
Brush each sheet of filo with butter and lay a third of the pastry in the ovenproof dish. Top with half of the pumpkin mixture. Add half of the remaining pastry, ensuring each sheet is brushed with butter. Add remaining pumpkin mixture and top with remaining pastry. Brush top layer of filo with butter. Chill baklava in fridge for 20 minutes then slice into large diamond shapes.