Preheat oven to 350°F. Grease a 9x5-inch loaf pan and line with a parchment sling.
Whisk flour, baking soda, baking powder, salt, cinnamon, and pumpkin pie spice in a large bowl.
In another bowl, whisk pumpkin puree, both sugars, beaten eggs, oil, and vanilla until smooth and glossy.
Add the dry mix to the wet mixture. Gently fold just until no streaks of flour remain.
Fold in walnuts or chocolate chips if using. Do not overmix.
Scrape batter into the prepared pan. Smooth the top and tap the pan once to release bubbles.
Bake 55–65 minutes, until a tester comes out with a few moist crumbs. Tent with foil if browning early.
Cool 15 minutes in the pan. Lift out and cool completely on a rack before slicing.