Preheat the oven to 350°F (175°C).
Grease a 9-inch square baking pan and line it with parchment paper.
To make the crumb topping, combine flour, brown sugar, cinnamon, and salt in a medium bowl.
Add the melted butter and stir with a fork until coarse crumbs form. Set aside.
In a separate bowl, whisk together flour, baking soda, baking powder, salt, cinnamon, nutmeg, and ginger.
In a large bowl, beat softened butter, brown sugar, and granulated sugar for 2–3 minutes, until light and creamy.
Add the eggs one at a time, mixing well after each addition.
Stir in the vanilla extract.
Add pumpkin puree and buttermilk and mix until combined.
Gradually add the dry ingredients and mix just until incorporated. Do not overmix.
Pour the batter into the prepared pan and smooth the top.
Sprinkle the crumb topping evenly over the batter.
Gently press a few of the larger crumbs into 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 before slicing.
For the optional glaze, whisk powdered sugar, milk, and vanilla until smooth.
Drizzle the glaze over the cooled cake.
Slice and serve.