Preheat the oven to 350°F (175°C). Grease and line an 8x8-inch or 9x9-inch baking pan with parchment paper.
Make the streusel by mixing flour, brown sugar, cinnamon, and salt. Stir in melted butter until coarse crumbs form. Add pecans if using and set aside.
In a medium bowl, whisk together flour, baking powder, baking soda, salt, pumpkin pie spice, and cinnamon.
In a separate large bowl, whisk together melted butter, granulated sugar, and brown sugar. Add eggs, pumpkin puree, and vanilla and mix until smooth. Stir in the milk.
Gradually add the dry ingredients to the wet ingredients. Stir just until combined; do not overmix.
Spread the batter evenly into the prepared pan.
Sprinkle the streusel evenly over the top.
Bake for 40–50 minutes, or until a toothpick inserted in the center comes out with a few moist crumbs.
Cool in the pan for 15–20 minutes before slicing and serving.