Mix Filling: In a medium bowl, beat together the softened cream cheese, powdered sugar, and vanilla extract until smooth and creamy. Set aside.
Make the Muffin Batter:
Preheat Oven: Preheat your oven to 350°F (175°C) and line a muffin tin with paper liners or grease it.
Combine Dry Ingredients: In a large bowl, whisk together the flour, baking soda, baking powder, spices (cinnamon, nutmeg, ginger), and salt.
Mix Wet Ingredients: In another bowl, combine the granulated sugar, brown sugar, vegetable oil, pumpkin puree, eggs, and vanilla extract. Mix until well combined.
Combine Wet and Dry: Gradually add the wet ingredients to the dry ingredients, stirring until just combined. Be careful not to overmix.
Assemble the Muffins:
Fill Muffin Tin: Spoon about 1 tablespoon of muffin batter into the bottom of each muffin cup. Then add about 1 tablespoon of the cream cheese filling on top. Finally, cover with another tablespoon of muffin batter to completely enclose the filling.
Add Topping: If using, sprinkle chopped pecans or walnuts and a little sugar on top of each muffin.
Bake:
Bake: Bake in the preheated oven for 25-30 minutes, or until a toothpick inserted into the center comes out clean (a few moist crumbs are okay).
Cool: Allow the muffins to cool in the tin for about 5 minutes before transferring them to a wire rack to cool completely.