Preheat your oven to 350°F (175°C). Grease two 9-inch round cake pans, line the bottoms with parchment paper circles, and grease the parchment as well.
In a large bowl, whisk together the flour, baking powder, baking soda, salt, pumpkin pie spice, cinnamon, and ginger until evenly combined. Set aside.
In a separate large bowl, whisk together the granulated sugar, brown sugar, and oil for 1 minute, then add the eggs one at a time. Mix in the pumpkin puree, vanilla extract, and cooled espresso until smooth and uniform.
Pour the dry ingredients into the wet ingredients and fold gently with a rubber spatula until just combined with no visible streaks of flour. Do not overmix.
Divide the batter evenly between the two prepared pans and bake on the middle rack for 32 to 38 minutes, or until a toothpick inserted in the center comes out clean or with a few moist crumbs.
Let the cakes cool in the pans for 15 minutes, then turn out onto a wire rack, peel off the parchment, and cool completely before frosting, about 1 to 2 hours.
Beat the softened cream cheese until smooth, then add the butter and beat until fluffy. Gradually mix in the sifted powdered sugar, then add the cooled espresso, vanilla, and a pinch of salt and beat until creamy and smooth.
Level the cake layers if needed, then stack with a generous layer of frosting between them. Apply a thin crumb coat, chill for 15 minutes, then frost the top and sides completely. Dust with pumpkin pie spice and top with crushed candied pecans and cinnamon sticks if desired.