Preheat oven to 350°F (175°C). Grease and flour a 9x13 inch baking pan or line with parchment paper.
Peel and grate carrots on the medium-sized holes of a box grater to get 2 cups (220g) of small, uniform shreds.
In a large bowl, whisk spice cake mix with cinnamon and nutmeg until evenly distributed.
In a medium bowl, beat the eggs, vegetable oil, applesauce, and vanilla extract until smooth.
Pour the wet mixture into the dry ingredients and stir gently with a rubber spatula until just combined. Do not overmix.
Fold in the grated carrots, chopped walnuts, and raisins (if using) until evenly distributed throughout the batter.
Pour the batter into the prepared pan, spread evenly, and tap the pan on the counter to release air bubbles.
Bake on the center rack for 30-35 minutes until a toothpick inserted in the center comes out clean or with a few moist crumbs.
Cool the cake in the pan on a wire rack for 15 minutes, then cool completely to room temperature (about 1 hour).
Beat softened cream cheese and butter with an electric mixer for 2-3 minutes until light, fluffy, and smooth.
Gradually add powdered sugar, one cup at a time, beating well after each addition. Add vanilla extract and heavy cream.
Beat on high speed for 2 minutes until the frosting is light, airy, and holds soft peaks.
Spread the cream cheese frosting evenly over the completely cooled cake using an offset spatula.
Refrigerate the frosted cake for at least 30 minutes to set the frosting before slicing and serving.