Preheat oven to 350°F (175°C). Grease and flour two 9-inch round cake pans or line them with parchment paper.
In a large bowl, whisk together flour, baking soda, cinnamon, and nutmeg. Set aside.
In another bowl, beat eggs, granulated sugar, brown sugar, vegetable oil, and vanilla extract until smooth.
Fold in grated carrots, drained pineapple, shredded coconut, and chopped nuts into the wet mixture.
Gradually combine the wet and dry ingredients until just mixed. Do not overmix.
Divide the batter evenly between the prepared pans. Bake for 30–35 minutes, or until a toothpick comes out clean.
Let the cakes cool in the pans for 10 minutes, then transfer to a wire rack to cool completely.
For the frosting, beat cream cheese and butter until smooth. Gradually add powdered sugar and mix until creamy. Stir in vanilla extract.
Frost the cooled cakes, layer by layer. Garnish with coconut flakes or nuts, if desired.