Prepare the Carrots: Wash and grate the carrots using the larger holes of a box grater. Set the freshly grated carrots aside.
Prepare the Cake Pans: Preheat the oven to 350°F. Grease two 9-inch round cake pans and line the bottoms with parchment paper.
Mix the Dry Ingredients: In a large bowl, whisk together the flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger until evenly combined.
Mix the Wet Ingredients: In another bowl, whisk together the eggs, vegetable oil, brown sugar, granulated sugar, and vanilla extract until smooth.
Combine the Batter: Gradually add the dry ingredients to the wet ingredients. Stir gently with a spatula until just combined. Do not overmix.
Add Carrots and Walnuts: Fold in the freshly grated carrots and chopped walnuts until they are evenly distributed throughout the batter.
Bake the Cake: Divide the batter evenly between the prepared cake pans. Bake for about 28–32 minutes, or until a toothpick inserted into the center comes out clean.
Cool the Cake: Let the cakes cool in their pans for several minutes, then transfer them to a cooling rack. Allow them to cool completely before frosting.
Make the Cream Cheese Frosting: Beat the softened cream cheese and butter until smooth and creamy. Gradually add the powdered sugar and vanilla extract, beating until the frosting is smooth and spreadable.
Assemble the Cake: Place one cooled cake layer on a serving plate. Spread frosting over the top, add the second cake layer, and frost the top and sides.
Slice and Serve: Sprinkle chopped walnuts over the frosting if desired. Slice and serve the moist carrot cake.