Preheat oven to 350 degrees Fahrenheit. Grease and flour a 9x5 inch loaf pan or line with parchment.
In a medium bowl, whisk together flour, pumpkin pie spice, cinnamon, baking soda, baking powder, and salt.
In a large bowl, whisk together oil, both sugars, eggs, and vanilla until smooth.
Stir in mashed bananas and pumpkin puree until combined.
Add the dry ingredients to the wet ingredients and stir gently until just combined. Do not overmix. Fold in walnuts if using.
Pour batter into prepared pan. Bake 50 to 60 minutes until a toothpick inserted in the center comes out clean and the top feels firm. Tent with foil if the top browns too quickly.
Cool in pan 10 minutes, then transfer to a wire rack. Cool completely before slicing — at least 1 hour.