Grind star anise, cloves, and allspice in a clean electric grinder. Sift the spice blend through a coarser sieve to catch large chunks of unmixed spices. These coarse pieces can be ground and sieved again.
Peel the zucchini and grate it finely on a hand grater with small holes. Squeeze the excess moisture through a sieve and set it aside, you will use it in a while.
In a large bowl, combine flour, baking powder, cocoa powder, ground cinnamon, and homemade spices.
Using a hand-held electric mixer, beat the eggs, which are at room temperature, with the coarse sugar until fluffy. Add the sugar gradually. Be patient, the whole process can take around five minutes or more. Don't be afraid to use a higher speed on the mixer. Finally, add the lemon zest.
Gradually add the oil, dry flour mixture, and zucchini juice to the beaten egg mixture. Whisk with a hand mixer on low speed. In the end, stir in the shredded zucchini.
Prepare a baking sheet: grease it with butter or oil and dust with fine breadcrumbs. Pour batter onto the prepared pan and smooth the surface.
Bake the spiced zucchini cake in a preheated oven at 340°F (170°C) for about 35 minutes. At the end of baking, insert a wooden toothpick into the pastry. If it comes out dry, you're done!