Preheat the oven to 350°F (175°C). Grease the loaf pan or line it with parchment paper for easier removal.
In a mixing bowl, combine the all-purpose flour, whole wheat flour, baking soda, baking powder, ground cinnamon, ground nutmeg, and salt. Whisk together until evenly mixed.
In another bowl, whisk together the granulated sugar, brown sugar, and vegetable oil until well combined. Add the eggs one at a time, mixing well after each addition.
Stir in the pumpkin puree, grated zucchini, and vanilla extract into the wet ingredients, combining thoroughly.
Gradually add the dry ingredients to the wet ingredients, mixing until just combined. Be careful not to overmix. If using, fold in the chopped nuts at this stage.
Pour the batter into the prepared loaf pan, smoothing the top with a spatula.
Bake in the preheated oven for about 60 minutes, or until a toothpick inserted into the center comes out clean.
Remove the bread from the oven and let it cool in the pan for about 10 minutes before transferring it to a wire rack to cool completely.
Before adding the grated zucchini, make sure to squeeze it to remove excess moisture, ensuring the bread remains moist but not too wet.
Adjust the spices to your preference, adding more cinnamon or nutmeg if desired.
Store the bread in an airtight container at room temperature for up to 3 days or freeze for longer storage.