Preheat oven to 350°F (175°C). Grease and line two 8-inch round cake pans with parchment, or use a 9x13-inch pan for a single-layer cake.
In a medium bowl, whisk the gluten-free flour, baking powder, baking soda, cinnamon, nutmeg, and salt.
In a large bowl, whisk eggs, brown sugar, and granulated sugar until slightly thick and homogenous, about 1 minute.
Whisk in the oil, applesauce, and vanilla until smooth.
Fold the dry ingredients into the wet just until combined.
Do not overmix.
Fold in grated carrots, drained pineapple, and any optional nuts or raisins. The batter will be thick.
Divide batter between the prepared pans (or spread evenly in a 9x13). Smooth the tops.
Bake 22–26 minutes for 8-inch rounds, or 28–34 minutes for a 9x13, until a toothpick comes out with a few moist crumbs.
Cool in the pan for 10 minutes, then transfer to a wire rack to cool completely before frosting.
Make the frosting: Beat dairy-free cream cheese and buttery spread until smooth and fluffy, 1–2 minutes.
Add vanilla and salt. Gradually beat in powdered sugar until creamy and spreadable.
Frost cooled cakes. For a layer cake, place one layer on a plate, add frosting, top with the second layer, and finish with more frosting.
Chill 20–30 minutes to set if slicing neat slices.