Cook the pumpkin in an ovenproof baking dish at 325° until soft. Cool and scrape the flesh from the skin using a spoon. Mix the pumpkin with the crumbled amaretti, raisins, cinnamon, sugar and the Mostarda cut into cubes.
Prepare the puff pastry by rolling it out to a thickness of less than 1/8 inch and cut into squares 1 1/2 to 2 inches on a side. Place a teaspoon of the pumpkin mixture in the center of each square and fold the pastry into whatever shape you like (pocket, candy wrapper, envelope etc.)
Arrange the dumplings on a baking sheet lined with parchment paper, brush the tops with the beaten egg and bake in a preheated 350° oven for about 15 minutes. Remove from the oven and serve, sprinkled with powdered sugar if you like.