Preheat the oven to 375 degrees F. Cut the pumpkin or squash into quarters and remove the seeds. Brush the insides with a little olive oil and arrange on a baking sheet, skin-side up. Roast in the oven until the pumpkin or squash is soft all the way through, about 1 hour. Remove from the oven and let cool. Discard the skin and puree the flesh in a food processor. (The puree can be prepared 1 or 2 days ahead.)
Preheat the oven to 350 degrees F. In a large bowl, combine 2 1/2 cups of the pumpkin or squash puree, the eggs, brown sugar and spices. Whisk in the cream and vanilla.
Combine the bread, raisins and ginger in a 7-by-11-inch baking dish. Pour the pudding mixture over the bread to cover and let sit 15 minutes. (You might not use all of the pudding mixture at first; add more if there's room in the dish once the bread has soaked.) Bake in the preheated oven until the custard is set, about 40 minutes. Spoon into bowls and sprinkle a dusting of confectioners' sugar on top, if desired. It's fall in a dessert.