Preheat the oven to 350°F (175°C). Grease a 9x13 pan with butter or oil, then line the bottom with parchment paper and set aside.
Peel and trim 5 to 6 medium carrots. Grate them on the small holes of a box grater or with a food processor until you have 3 packed cups (about 330 g). Set aside on a plate.
In a large bowl, whisk together the flour, baking soda, salt, cinnamon, and nutmeg until no lumps remain. Set aside.
In a second large bowl, whisk the granulated sugar, brown sugar, and oil until glossy. Add the eggs one at a time, whisking well after each, then whisk in the vanilla.
Pour the dry ingredients into the wet ingredients and stir gently with a spatula just until the flour disappears. Fold in the grated carrots and chopped nuts until evenly distributed.
Pour the batter into the prepared pan and smooth the top. Bake on the center rack for 32 to 38 minutes, or until a toothpick inserted in the middle comes out clean or with a few moist crumbs.
Let the cake cool in the pan on a wire rack for 15 minutes. Lift it out using the parchment and cool completely on the rack, about 45 minutes to 1 hour.
Beat the softened cream cheese and butter together until smooth and lump-free. Add the sifted powdered sugar about one cup at a time on low, then beat in the vanilla and a pinch of salt until light and spreadable.
Spread the frosting evenly over the fully cooled cake with an offset spatula. Add a light sprinkle of extra chopped nuts if desired, then slice into 15 squares and serve.