Preheat the oven to 350℉. Grease and flour a 9x9-inch baking pan*, then set aside.
In a small bowl, whisk together the flour, baking soda, baking powder, cinnamon, nutmeg, and salt. Set aside.
Shred the zucchini on the large holes of a box grater, then press between layers of paper towels** to remove excess moisture. Set the zucchini aside.
In a large bowl, use a hand-held mixer to mix together the sugars, oil, eggs, vanilla extract, and orange zest until smooth and fluffy, about 1 minute. Add the sourdough discard and mix until smooth.Fold the dry ingredients into the wet ingredients and mix until nearly combined. Fold in the zucchini, walnuts, and raisins and mix until just combined. Transfer the batter to the prepared baking pan.
Bake for 50-55 minutes or until a toothpick inserted in the center of the cake comes out clean. Let the cake cool in the pan for about 15 minutes, then transfer to a cooling rack to cool fully.
After the cake has cooled, make the frosting. In a medium bowl, whip the butter with a hand-held mixer until smooth and creamy, about 2-3 minutes. Add the sour cream (or cream cheese) and vanilla extract, and mix until smooth. Add the powdered sugar and mix until smooth. If the icing seems too thick, add more sour cream (1 Tablespoon at a time) to reach a thinner consistency.
Transfer the cooled cake to a serving plate or board, then spread the cake with the frosting. Slice and serve!
Video
Notes
*If you don't want to grease and flour your pan, you can also grease your baking pan and line it with parchment paper.**Press between layers of paper towels, or gather the shredded zucchini into a ball, wrap with paper towels, and wring out as much moisture as possible. To make this recipe with active sourdough starter, replace the sourdough discard with active starter (200g). You don't need to change any other ingredients in the recipe.