Ingredients

1 stick unsalted butter, melted, plus more, softened, for pan 

1 3/4 cups unbleached all-purpose flour 

1/2 cup Dutch-process cocoa powder 

1 3/4 cups granulated sugar 

1 1/2 teaspoons baking powder 

1/4 teaspoon baking soda 

1 teaspoon kosher salt 

4 large eggs 

2 teaspoons pure vanilla extract 

4 cups grated zucchini (from 2 medium), drained and squeezed of excess moisture 

5 ounces semisweet chocolate, chopped (1 cup) 

2 sticks unsalted butter, room temperature 

16 ounces cream cheese, room temperature 

2 1/4 cups confectioners' sugar 

1 1/2 teaspoons pure vanilla extract 

Sugared Zucchini Blossoms, for serving (optional)

Preparation

Cake: Preheat oven to 350 degrees. Butter a 10-by-15-inch jelly-roll pan. Line bottom with parchment, leaving a 2-inch overhang on 2 sides; butter parchment.

Whisk together flour, cocoa, granulated sugar, baking powder, baking soda, and salt. In another bowl, whisk together eggs, butter, and vanilla. Stir egg mixture into flour mixture until batter loosens, about 1 minute. Stir in zucchini and chocolate (batter will be quite thick). Spread evenly into prepared pan; smooth top with a spatula. Bake until a tester inserted into cake comes out clean, 28 to 30 minutes. Transfer to a wire rack; let cool completely. Remove from pan.

Frosting: Beat butter on medium-high speed until smooth, 2 minutes. Add cream cheese; beat to combine. Reduce speed to medium-low and add confectioners’ sugar, 1/2 cup at a time, beating until thickened. Beat in vanilla. Spread frosting over cake, scatter with zucchini blossoms, and serve. Cake can be refrigerated (without blossoms) up to 8 hours.