Prep the pan and oven: Heat oven to 350°F (175°C). Grease a 9x13-inch baking pan and line with parchment, leaving overhang for easy lifting.
Mix dry ingredients: In a large bowl, whisk flour, granulated sugar, brown sugar, baking powder, baking soda, salt, cinnamon, ginger, and nutmeg until evenly combined.
Add wet ingredients: Add pumpkin puree, oil, eggs, and vanilla.
Stir with a spatula until smooth and no dry streaks remain. Fold in nuts if using.
Bake: Spread batter evenly in the pan. Bake 22–28 minutes, or until the center springs back and a toothpick comes out with a few moist crumbs.
Cool completely: Set the pan on a rack and let the bars cool fully before frosting.
This prevents melting and sliding.
Make the frosting: Beat cream cheese and butter together until fluffy, 1–2 minutes. Add vanilla and salt. Gradually beat in powdered sugar until smooth and spreadable.
Frost and finish: Spread frosting over cooled bars.
For clean slices, chill 20–30 minutes, then cut into squares or rectangles.