Preheat the oven to 350°F, or 175°C. Grease a 9-by-5-inch loaf pan and line it with parchment paper.
Wash and grate the zucchini using the large holes of a box grater. Gently press out some excess moisture if the zucchini is very watery.
In a medium bowl, whisk together the all-purpose flour, baking soda, baking powder, salt, cinnamon, and nutmeg.
In a separate large bowl, whisk together the eggs, vegetable oil, granulated sugar, brown sugar, and vanilla extract.
Stir the grated zucchini into the wet ingredients until well combined.
Add the dry ingredients to the wet mixture. Stir gently with a spatula until just combined. Do not overmix.
Fold in the chopped walnuts or chocolate chips, if using.
Pour the batter into the prepared loaf pan and smooth the top.
Bake for 50–60 minutes, or until a toothpick inserted into the center comes out clean or with a few moist crumbs.
Allow the zucchini bread to cool in the pan for 10–15 minutes.
Transfer the loaf to a wire rack and let it cool completely before slicing and serving.