Preheat the oven to 350°. Spray a 9-by-13-inch metal baking pan with vegetable spray. Line the pan with parchment paper and spray the paper.
On a rimmed baking sheet, toast the walnuts for about 7 minutes, until lightly browned and fragrant. Remove from the oven, add the butter and toss to coat the walnuts.
In a medium bowl, combine the all-purpose flour, cake flour, baking powder, baking soda, salt, cinnamon, nutmeg, allspice and ginger; whisk to blend. In another bowl, whisk the eggs with the oil, granulated sugar, brown sugar and vanilla until smooth. Stir in the dry ingredients just incorporated, then stir in the carrots and walnuts. Pour the batter into the prepared pan and bake for 40 minutes, or until a tester inserted in the center of the cake comes out clean.
Transfer the cake to a rack and let cool for 15 minutes. With a paring knife, loosen the cake from the side of the pan. Invert the cake onto the rack and gently peel off the parchment paper. Let cool completely, at least 2 hours.
In the bowl of a stand mixer fitted with the paddle, beat the cream cheese with the butter at medium speed until blended, about 30 seconds. Beat in the confectioners' sugar in two batches, mixing thoroughly between additions, about 1 minute. Beat in the vanilla.
Transfer the cake to a platter and spread the frosting over the top and sides. Serve at room temperature or chilled.
The frosting can be refrigerated for up to 2 days; bring to room temperature before using. The frosted cake can be refrigerated for up to 3 days.