Preheat the oven: Preheat your oven to 325°F. Lightly grease a 9x13-inch glass baking dish and set aside.
Mix the dry ingredients: In a large bowl, whisk together the flour, baking powder, baking soda, salt, cinnamon, ginger, and nutmeg. Set aside.
Drain the pineapple: Place the crushed pineapple in a sieve and let it drain well. Gently press with paper towel or the back of a spoon to remove excess liquid. This helps prevent the cake from becoming soggy.
Mix the wet ingredients: In a medium bowl, whisk together the brown sugar, granulated sugar, vegetable oil, drained crushed pineapple, vanilla extract, and eggs until fully combined and no brown sugar lumps remain.
Combine the batter: Pour the wet ingredients into the dry ingredients and fold together with a rubber spatula or wooden spoon until just combined. Fold in the freshly shredded carrots. Do not overmix.
Bake: Pour the batter into the prepared baking dish and spread it into an even layer. Bake for 40 to 50 minutes, but begin checking at the 35-minute mark. The cake is done when a toothpick inserted into the centre comes out clean or with a few moist crumbs. Do not overbake. If the top is browning too quickly, loosely tent it with foil.
Cool: Allow the cake to cool in the pan set on a wire rack for 1 hour. Then place it in the refrigerator to speed up the cooling process, if needed. The cake must be completely cool before frosting.