Preheat the oven to 350°F (175°C) and position a rack in the center. Lightly grease two 8-inch round cake pans with coconut oil or cooking spray, line the bottoms with parchment rounds, and grease the parchment too.
Peel about 4 medium carrots, then grate them on the medium holes of a box grater until you have 2 cups (220 g). Do not squeeze out the moisture.
In a large bowl, whisk together the white whole wheat flour, baking powder, baking soda, cinnamon, nutmeg, ginger, and salt for 20 seconds until evenly distributed.
In a second large bowl, whisk the eggs until pale and slightly frothy. Add the maple syrup, applesauce, cooled coconut oil, Greek yogurt, and vanilla, and whisk until smooth.
Pour the wet mixture into the bowl of dry ingredients and stir gently with a silicone spatula until just combined, with no dry streaks remaining.
Add the grated carrots, ½ cup chopped walnuts, and the raisins if using. Fold everything through with a few gentle strokes until evenly distributed.
Divide the batter evenly between the two prepared pans and smooth the tops. Sprinkle the reserved 2 tablespoons of walnuts over one layer if desired. Bake for 30 to 34 minutes, until a toothpick inserted in the center comes out clean.
Let the cakes cool in their pans for 10 minutes, then run a knife around the edge. Turn them out onto a wire rack, peel off the parchment, and cool completely, about 30 minutes.
Using an electric hand mixer, beat the softened cream cheese until smooth and lump-free. Add the Greek yogurt, maple syrup, and vanilla, and beat just until combined and spreadable.
Place one cooled layer on a plate and spread a third of the frosting over the top with an offset spatula. Set the second layer on top and cover with the remaining frosting. Chill for 20 minutes before slicing.