Step 1: Prepare the Oven and Pans: Preheat the oven to 350F (175C). Grease and flour two 9-inch round cake pans. Alternatively, line the bottoms with parchment paper for easy removal.
Step 2: Whisk Dry Ingredients: In a large bowl, whisk together the flour, baking soda, cinnamon, nutmeg, ginger, and salt. Ensure all ingredients are evenly distributed for a uniform flavor throughout the cake.
Step 3: Combine Wet Ingredients: In a separate large bowl, whisk together the sugar, oil, eggs, and vanilla extract until well combined. The mixture should appear smooth and slightly pale.
Step 4: Incorporate Wet and Dry Ingredients: Gradually add the dry ingredients to the wet ingredients, mixing until just combined. Be careful not to overmix; overmixing can lead to a tough cake.
Step 5: Fold in Carrots, Nuts, and Raisins: Gently fold in the grated carrots, chopped nuts, and raisins (if using) until evenly distributed throughout the batter.
Step 6: Divide and Bake: Pour the batter evenly into the prepared cake pans. Bake for 30-35 minutes, or until a wooden skewer inserted into the center comes out clean.
Step 7: Cool the Cakes: Let the cakes cool in the pans for 10 minutes before inverting them onto a wire rack to cool completely. Ensure the cakes are completely cool before frosting to prevent the frosting from melting.
Step 8: Prepare the Frosting: In a large bowl, beat the softened cream cheese and butter until smooth and creamy. Gradually add the confectioners' sugar, beating until fully incorporated and the frosting is smooth. Stir in the vanilla extract and a pinch of salt.
Step 9: Frost the Cake: Once the cakes are completely cool, place one cake layer on a serving plate or cake stand. Spread a generous layer of frosting over the top. Place the second cake layer on top of the frosting and frost the entire cake with the remaining frosting.
Step 10: Decorate (Optional): Decorate the cake with chopped nuts, carrot shavings, or other desired toppings.
Optional Tips: Substitute applesauce for half of the oil for a slightly lighter cake. Toast the nuts for added flavor. For a richer frosting, use European-style butter.