Preheat oven to 350°F and line a 12-cup muffin tin with paper liners.
In a large bowl, whisk together the flour, baking powder, baking soda, cinnamon, nutmeg, and salt. Set aside.
In a separate bowl, whisk together the oil, granulated sugar, brown sugar, eggs, milk, and vanilla until well combined.
Pour the wet ingredients into the dry ingredients and fold together until just combined. When a few streaks of flour remain, fold in the carrots, walnuts, and raisins. Do not overmix.
Divide the batter evenly between the prepared muffin cups, filling each about 3/4 full.
Bake for 20 to 25 minutes, until a toothpick inserted in the center comes out clean and the tops are set and lightly golden. Allow the muffins to cool completely before frosting.
To make the frosting, beat the cream cheese and butter together in a medium bowl on high speed with an electric mixer until smooth and creamy. Add the powdered sugar one cup at a time, mixing on low until incorporated, then increase to high speed and beat until light and fluffy. Beat in the vanilla.
Spoon or pipe the frosting onto the cooled muffins and top with chopped walnuts.