Preheat the oven to 350°F / 175°C. Grease three 8in / 20cm cake pans and line them with parchment paper.
Whisk 2¼ cups of all-purpose flour, 1½ teaspoons of baking powder, 1 teaspoon of baking soda, 1 teaspoon of ground cinnamon, ½ teaspoon of salt, ¼ teaspoon of ground ginger, and ¼ teaspoon of ground nutmeg.
In a large bowl, beat 4 eggs, 1½ cups of granulated sugar, ⅔ cup of brown sugar, 1 cup of vegetable oil, ½ cup of buttermilk, ½ cup of crushed pineapple, and half of the 4 teaspoons of vanilla extract.
Mix in the flour mixture until incorporated, then fold in 2½ cups of finely grated carrots. Divide among the pans and bake for 25-30 minutes, until a toothpick comes out clean.
Cool in the pans for 10-15 minutes, then turn out onto a rack and cool completely.
For the frosting, beat 450g of softened cream cheese and ¾ cup of softened butter until smooth. Beat in the remaining vanilla, then 4 cups of icing sugar, a cup at a time.
Stack the layers on a plate, spreading frosting between them, then frost the top and sides. Refrigerate for at least 30 minutes before slicing.