Preheat oven to 350°F (175°C). Grease and flour two 9-inch round cake pans or line with parchment paper.
In a medium bowl, whisk together flour, baking soda, baking powder, cinnamon, nutmeg, clove, and salt. Set aside.
In a large mixing bowl, whisk together vegetable oil and granulated sugar until well combined. Add eggs one at a time, beating well after each addition. Stir in vanilla extract.
Fold the shredded carrots and crushed pineapple (with juice) into the wet mixture until evenly distributed.
Gently fold the dry ingredient mixture into the wet ingredients, stirring until just combined. Do not overmix.
Divide batter evenly between prepared pans. Bake for 35-40 minutes, until a toothpick inserted in the center comes out with a few moist crumbs.
Remove cakes from oven and let cool in pans for 10 minutes. Turn out onto wire racks and cool completely before frosting.
Beat softened cream cheese and butter together until light and fluffy, about 2-3 minutes. Gradually add powdered sugar, beating until smooth.
Place one cake layer on a serving plate. Spread a layer of frosting on top. Add the second cake layer, then frost the top and sides. Garnish with toasted coconut flakes.
Notes
Make sure to use crushed pineapple with juice for optimal moisture. Cake keeps well refrigerated for up to 5 days.