Preheat oven to 180°C.
For pastry: Press pastry into base and sides of a 23 cm ovenproof pie dish.
For filling: Heat butter in a heavy-based saucepan. Add onion and bacon and sauté until onion is translucent. Allow to cool slightly. Add the pumpkin and cheese and mix through. Beat eggs and milk together and add to the pumpkin mixture with the seasoning. Spoon into base. Bake in oven for 40 - 45 minutes. Serve as a main or side dish.