Preheat the oven to 350°F (175°C). Line an 8-inch square pan or two 8-inch round pans with parchment and lightly grease the sides.
Make the flax eggs.
In a small bowl, mix ground flaxseed with warm water. Set aside for 5–10 minutes until gelled.
Whisk the dry ingredients. In a large bowl, whisk flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
Combine the wet mix.
In a separate bowl, whisk brown sugar, maple syrup, oil, non-dairy milk, vanilla, and the flax mixture until smooth.
Bring it together. Pour the wet mixture into the dry and stir just until combined. Fold in grated carrots, and if using, pineapple, nuts, and raisins.
Do not overmix.
Bake. Spread the batter evenly in the prepared pan(s). Bake 28–34 minutes for rounds or 32–38 minutes for a square, until a toothpick comes out clean with a few moist crumbs.
Cool completely.
Let the cake rest in the pan for 10 minutes, then transfer to a rack. Cool fully before frosting.
Make the frosting. Beat vegan butter and dairy-free cream cheese until fluffy, 1–2 minutes.
Gradually add powdered sugar, then vanilla and a pinch of salt. Beat until smooth and thick.
Frost and finish. Spread frosting over the cooled cake.
Add a sprinkle of chopped nuts or a dusting of cinnamon if you like.