Preheat oven to 350°F. Grease a 9×9 square baking pan. Set aside.
In a large bowl, combine flour, granulated sugar, baking soda, cinnamon, pie spice, and salt. Add milk, pumpkin, butter, and vanilla. Stir with a wooden spoon or rubber spatula until combined. Fold in pecans, if using.
Transfer the batter to the prepared pan and spread into an even layer. For the topping, sprinkle the cinnamon and brown sugar over the batter. Pour boiling water on the top (do not stir).
Carefully transfer the pan to the oven and bake for 25-30 minutes. A toothpick inserted into the center of the cake should come out clean, and there should be a wet, pudding-like layer under the cake. Place on a wire rack to cool slightly. Serve warm with vanilla ice cream or whipped cream.