Method
Preheat oven to 350°F (177°C). Grease and line two 9-inch cake pans.
Whisk flour, cinnamon, nutmeg, baking soda, and salt together in a bowl.
In a separate large bowl, whisk together the vegetable oil, granulated sugar, and brown sugar.
Add eggs to the oil and sugar mixture one at a time, mixing until smooth after each addition.
Fold the finely grated carrots into the wet mixture until evenly distributed.
Fold the dry ingredients into the wet ingredients just until no dry flour remains; do not overmix.
Divide the batter evenly between the prepared pans and smooth the tops.
Bake for 25–30 minutes, or until a toothpick inserted in the center comes out clean.
Cool cakes in the pans for 10 minutes, then transfer to a wire rack and cool completely before frosting.
To make the frosting, beat the softened cream cheese and butter together until smooth and creamy.
Add the powdered sugar gradually, mixing until combined, then stir in the vanilla until smooth.
Frost the cooled cake layers and assemble. Chill briefly if needed to set the frosting.
Notes
Flavor improves overnight. Store covered in the refrigerator up to 4 days.