Heat the oven to 350°F (175°C). Grease and line two 9-inch round cake pans with parchment on the bottoms.
In a medium bowl, whisk together the all-purpose flour, baking soda, baking powder, ground cinnamon, ground nutmeg, and 0.5 tsp salt.
In a large bowl, whisk the granulated sugar, light brown sugar, vegetable oil, eggs, and 2 tsp vanilla extract until smooth and emulsified, 1–2 minutes.
Add the dry ingredients to the wet and stir with a spatula just until a few streaks of flour remain.
Fold in the finely grated carrots and chopped walnuts until evenly distributed and no dry pockets remain.
Divide the batter evenly between the prepared pans and smooth the tops. Bake until the centers spring back and a toothpick comes out clean, 25–30 minutes.
Cool the cakes in the pans for 15 minutes, then invert onto a wire rack, peel off the parchment, and let cool completely, about 1 hour.
Make the frosting: In a mixing bowl, beat the softened cream cheese and softened unsalted butter together on medium speed until very smooth and creamy, 2–3 minutes. Sift the confectioners' sugar, then add it to the bowl along with 1 tsp vanilla extract and 0.125 tsp salt; beat on low to combine, then on medium-high until fluffy, 2–3 minutes.
Assemble: Place one cake layer on a serving plate. Spread about 1 cup of frosting over the top. Set the second layer on top, then frost the top and sides with the remaining frosting. Chill 15 minutes to set the frosting if desired, then slice and serve.