Preheat your oven to 350°F (175°C). Line a 12-cup muffin tin with cupcake liners and set aside.
In a medium bowl, whisk together the all-purpose flour, baking powder, baking soda, salt, ground cinnamon, nutmeg, and ginger.
In a large bowl, beat the granulated sugar, brown sugar, and vegetable oil until well combined. Add the eggs one at a time, beating well after each addition. Stir in the vanilla extract and pumpkin puree until smooth.
Gradually add the dry ingredients to the wet mixture, folding gently with a spatula until just combined. Avoid overmixing. If using, fold in the chopped walnuts.
Divide the batter evenly among the cupcake liners, filling each about two-thirds full. Bake for 20-22 minutes, or until a toothpick inserted into the center comes out clean. Remove from oven and allow cupcakes to cool in the pan for 5 minutes before transferring to a cooling rack.
In a medium bowl, beat together the softened cream cheese and butter until creamy and smooth. Gradually add powdered sugar, beating until fluffy. Mix in vanilla extract and ground cinnamon.
Once cupcakes are completely cool, frost generously using a piping bag or a knife. Optionally, sprinkle extra cinnamon or chopped walnuts on top for garnish. Enjoy!