Start by making the filling: Heat the olive oil in a large skillet over medium-high heat, then add the red onion and cook until almost tender and translucent, about 4 minutes. Add the grated pumpkin, cilantro, ginger, garam masala and a pinch of salt and continue to cook until the pumpkin is softened, about 2 minutes. Transfer the mixture to a large bowl; let cool completely.
Stir the Swiss, American and cheddar cheeses into the pumpkin mixture; season with salt.
Preheat the oven to 425 degrees F and line a baking sheet with parchment paper. Unfold the puff pastry on a lightly floured surface. Cut out 24 pumpkins with a 4-inch cutter; arrange half on the prepared baking sheet. If desired, cut out jack-o?-lantern faces from the remaining pumpkins using a paring knife. Heap 2 tablespoons of the filling in the center of each pumpkin on the baking sheet and brush the egg wash around the edges of each. Put the remaining puff pastry pumpkins on top. Seal the edges with a fork, then brush with more egg wash. Bake until golden and puffed, 20 to 25 minutes.