Preheat your oven to 375°F (190°C). Line a standard 12-cup muffin pan with paper liners. If you are out of liners, grease the cups well with butter or oil.
Shred and squeeze the zucchini: Use the large holes of a box grater to shred the zucchini. Place the shreds in the center of a clean dish towel, gather the corners, and wring tightly over the sink to remove as much liquid as possible. The zucchini should look fluffy, not wet and clumped. Set aside.
Shred the carrots using the same large holes. Pat them dry with a paper towel if they feel moist. No need to squeeze as hard as the zucchini.
Whisk the dry ingredients: In a large bowl, whisk together the flour, baking soda, baking powder, salt, cinnamon, nutmeg, and ginger. Set aside.
Whisk the wet ingredients: In a separate bowl, whisk together the brown sugar, oil, eggs, and vanilla until smooth and slightly thickened, about 30 seconds. There should be no lumps of sugar.
Combine wet and dry: Pour the wet mixture into the bowl with the dry ingredients. Using a rubber spatula, fold gently just until the flour disappears. A few streaks of flour and some lumps are fine – do not overmix.
Fold in vegetables and extras: Add the squeezed zucchini, shredded carrots, and optional walnuts or chocolate chips. Fold just until evenly distributed. The batter will be thick and speckled with green and orange.
Fill the muffin cups: Divide the batter evenly among the 12 cups, filling each about ¾ full. A cookie scoop makes this step mess-free.
Bake: Bake for 20 to 24 minutes, until the tops are domed and golden brown. Press the center of a muffin gently – it should spring back completely. A toothpick inserted in the center should come out clean or with a few moist crumbs, not wet batter.
Cool: Let the muffins rest in the pan for exactly 5 minutes. Then transfer them to a wire rack to cool completely. Do not leave them in the pan longer, or the bottoms will steam and soften.