Shred and salt the zucchini: Grate the zucchini on the large holes of a box grater until you have about 2 packed cups. Toss with 1/2 teaspoon salt in a colander and let sit in the sink for 10 minutes. The salt draws out excess water.
Meanwhile, preheat oven to 350°F. Grease two 9x5-inch loaf pans and line with parchment paper, leaving overhang on the long sides for easy removal.
Whisk dry ingredients: In a large bowl, whisk together flour, baking soda, baking powder, cinnamon, nutmeg, and the remaining 1/4 teaspoon salt (the zucchini already has salt). Set aside.
Mix wet ingredients: In a separate bowl, beat eggs and sugar together until pale and thick – about 1 minute by hand or 30 seconds with an electric mixer. Add oil, melted butter, and vanilla; whisk until smooth.
Squeeze the zucchini: Gather the salted zucchini in a clean kitchen towel or double layer of cheesecloth. Hold over the sink and twist firmly, squeezing out as much liquid as possible. You should see a significant amount of water released.
Combine: Pour wet ingredients into dry ingredients. Stir gently with a rubber spatula until just combined – a few streaks of flour are okay. Fold in the squeezed zucchini and walnuts (if using). Do not overmix.
Divide and bake: Divide batter evenly between prepared pans. Smooth tops. Bake for 50–55 minutes, until a skewer inserted into the center comes out with just a few moist crumbs attached. Start checking at 48 minutes if your oven runs hot.
Cool properly: Let loaves cool in pans on a wire rack for 15 minutes. Then lift out using parchment paper and cool completely on the rack. Do not slice while warm – the texture sets fully after cooling.