Preheat your oven to 350 degrees F. Grease and flour two 9-inch round cake pans.
In a medium-sized bowl, whisk together the flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger. Set aside.
In a large mixing bowl, beat the eggs until frothy. Gradually add the sugar and continue to beat until the mixture is light and fluffy.
Gradually stir in the vegetable oil and vanilla extract.
Add the dry ingredients to the wet ingredients, and stir until just combined.
Stir in the grated carrots, crushed pineapple, and chopped walnuts (if using).
Divide the batter evenly between the two prepared cake pans.
Bake for 30-35 minutes, or until a toothpick inserted into the center of the cakes comes out clean.
Let the cakes cool completely in the pans.
While the cakes are cooling, prepare the frosting. In a large mixing bowl, beat the cream cheese and butter until smooth and creamy.
Gradually add the powdered sugar and vanilla extract, and continue to beat until the frosting is fluffy and well-combined.
Once the cakes are completely cooled, remove them from the pans and place one cake layer on a serving plate.
Spread a thick layer of frosting over the top of the cake.
Place the second cake layer on top of the frosting, and spread another layer of frosting over the top and sides of the cake.
Decorate the cake with additional chopped walnuts, if desired.