Preheat the oven to 350°F (175°C).
Grease a 9-inch square baking pan and line it with parchment paper.
To prepare the crumb topping, combine flour, brown sugar, cinnamon, and salt in a bowl.
Add the melted butter and mix with a fork until coarse crumbs form. Set aside.
In a large bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
In a separate bowl, beat softened butter, brown sugar, and granulated sugar until light and creamy, about 2–3 minutes.
Add the eggs one at a time, mixing well after each addition.
Stir in the vanilla extract.
Add the pumpkin puree and buttermilk and mix until combined.
Gradually add the dry ingredients to the wet mixture.
Stir just until combined. Do not overmix.
Pour the batter into the prepared baking pan and smooth the top.
Sprinkle the crumb topping evenly over the batter.
Bake for 40–50 minutes, or until a toothpick inserted into the center comes out clean or with a few moist crumbs.
Allow the cake to cool in the pan for at least 20 minutes.
For the optional glaze, whisk powdered sugar, milk, and vanilla until smooth.
Drizzle the glaze over the cooled cake.
Slice and serve.