For cake: Preheat oven to 350 degrees. Grease a 13x9-inch baking pan.
Combine spices in small bowl; reserve 1/2 teaspoon for frosting.
Heat 4 tablespoons butter in 8-inch skillet over medium heat until melted, 1 to 2 minutes. Continue to cook, swirling pan constantly, until butter is light brown and has faint nutty aroma, 2 to 4 minutes. Add spices and continue to cook, stirring constantly, 15 seconds. Remove from heat and cool to room temperature, about 30 minutes.
Whisk flour, baking powder, baking soda and salt in medium bowl. In small bowl, gently whisk eggs, yolks, and vanilla to combine. In standing mixer fitted with paddle attachment, cream remaining 12 tablespoons butter with sugar and molasses at medium-high speed until pale and fluffy, about 3 minutes, scraping down sides and bottom of bowl twice with rubber spatula. Reduce to medium speed and add cooled butter and spice mixture, ginger, and half of egg mixture; mix until incorporated, about 15 seconds. Repeat with remaining egg mixture; scrape down bowl again. Reduce to low speed; add about one-third flour mixture, followed by half of the buttermilk, mixing until just incorporated after each addition, about 5 seconds. Repeat using half of remaining flour mixture and all of remaining buttermilk. Scrape bowl and add remaining flour mixture; mix at medium speed until batter is thoroughly combined, about 15 seconds. Remove bowl from mixer and fold batter once or twice with rubber spatula to incorporate any remaining flour.
Transfer batter to prepared pan; zigzag tip of rubber spatula through batter, pulling it to pan edges. Lightly tap pan against counter 3 or 4 times to dislodge any large air bubbles; smooth surface with spatula.
Bake until toothpick inserted in center of cake comes out clean, 32 to 37 minutes. Cool cake to room temperature in pan on wire rack, about 2 hours.
For frosting: In bowl of standing mixer fitted with paddle attachment, beat butter, sugar, and reserved 1/2 teaspoon spice mixture at medium-high speed until light and fluffy, 1 to 2 minutes. Add cream cheese one piece at a time, beating thoroughly after each addition. Add vanilla and beat until no lumps remain, about 30 seconds.
Using spatula, spread frosting evenly over surface of cake. Sprinkle cake with walnuts, if using, or lightly sprinkle with a little allspice. Cut into squares and serve.