Preheat Oven: Preheat oven to 350°F (180°C). Grease two 8–9 inch round cake pans and line with parchment paper.
Mix Dry Ingredients: In a large bowl, whisk together flour, baking soda, baking powder, salt, cinnamon, and nutmeg.
Mix Wet Ingredients: In another bowl, whisk oil, brown sugar, granulated sugar, eggs, and vanilla until smooth.
Combine Batter: Add grated carrots, crushed pineapple, and nuts to the wet ingredients. Fold wet ingredients into dry ingredients until just combined. Avoid overmixing.
Bake: Divide batter evenly into pans. Bake 30–35 minutes or until a toothpick inserted in the center comes out clean. Cool in pans 10 minutes, then transfer to wire rack.
Make Frosting: Beat cream cheese and butter until smooth. Gradually add powdered sugar and vanilla, beat until fluffy.
Assemble Cake: Place one layer on a plate, spread frosting, top with second layer, and frost top and sides. Decorate with nuts if desired.