Preheat your oven to 350°F (175°C). Spray two 9-inch round cake pans with non-stick cooking spray. Line the bottoms with parchment paper and spray again.
In a large bowl, whisk together the flour, sugar, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
In another bowl, beat together the vegetable oil, eggs, and vanilla extract until smooth and well combined.
Pour the wet ingredients into the dry ingredients and mix until just combined.
Fold in the grated carrots and crushed pineapple. If using, also fold in the walnuts or pecans and raisins.
Pour the batter evenly into the prepared pans. Use a kitchen scale to weigh the pans to ensure even layers. Adjust as necessary.
Bake in the preheated oven for 25-30 minutes, or until a toothpick inserted into the center comes out clean. Let the cakes cool in the pans for 10 minutes, then turn them out onto a wire rack to cool completely.
In the bowl of your stand mixer, beat together the softened cream cheese and butter until smooth.
Gradually add the powdered sugar and vanilla extract. Beat until creamy and smooth. If the frosting is too thick, add 1-2 tablespoons of milk until you reach the desired consistency.
Reserve about half a cup of frosting for decorating the cake later.
Once the cakes are completely cool, spread an even layer of frosting on top of one cake layer.
Place the second cake layer on top and frost the top and sides of the cake.
For a rustic look, use the reserved frosting to make simple swirls or dollops on top. Use a spatula or the back of a spoon to create a textured finish.
