Preheat oven to 350 degrees F. Line a 9x13 pan with parchment paper that extends beyond the pan and spray with nonstick cooking spray. Set aside.
Mix cinnamon, ginger, cloves, allspice, and nutmeg together in a large bowl. Remove 1/2 teaspoon for the frosting. To the large bowl, mix in flour, baking powder, baking soda and salt. Set aside.
With a stand or hand mixer, beat butter and sugar over medium high speed until light and fluffy, about 4 minutes, scraping down sides as needed. With mixer running on medium speed, beat in maple syrup, molasses and vanilla until well combined followed by eggs, then egg yolks, one at a time, beating just until the yellow disappears after each egg.
Gradually add flour mixture to butter/sugar mixture in thirds, alternately with sour cream in between each third, beating until just combined after each addition. Stir in apples and walnuts. Spoon batter into prepared pan.
Bake at 350 degrees F until a wood pick inserted near the center of cake comes out clean, 34 - 40 minutes. Let cake cool in pan on wire rack, about 2 hours before frosting OR serve warm directly right out of the oven without frosting.
Maple Frosting: Using a stand or hand mixer, beat the cream cheese, butter, sour cream, maple syrup, vanilla, salt and reserved 1/2 teaspoon spices at medium high speed until well combined. Add confectioners’ sugar 1/2 cup at a time then beat until very fluffy, about 2 minutes. Add either more maple syrup if frosting is too thick or more sugar if too thin to reach desired consistency. Evenly spread frosting over cake and sprinkle with chopped walnuts (optional).
Refrigerate cake for up to 5 days and bring to room temperature before serving.