Move oven rack to middle position and preheat oven to 350 degrees F. Spray 8x8-inch pan with nonstick cooking spray; cut and place a square of parchment paper on the bottom of the pan, lightly spray again, and set aside.
In a medium mixing bowl, whisk together flour, sugar, cinnamon, salt, baking soda, and baking powder. In a large measuring cup whisk together oil and eggs; add the mixture to dry ingredients and whisk until combined. Fold in zucchini and walnuts.
Pour batter into prepared pan and bake for 35-40 minutes, or until a toothpick comes out clean. Place pan on a cooling rack for 10 minutes, then run a knife around the edges of the cake pan, invert cake onto a cooling rack and cool completely about 1-2 hours.
FOR THE CREAM CHEESE FROSTING:
Once the cake is cool make the frosting. Add cream cheese, butter, sour cream, and vanilla to the bowl of a stand mixer fitted with the whisk attachment. Mix on high until combined, about 60 seconds, scraping down sides of the bowl as needed. Add confectioners’ sugar and mix on high until nice and fluffy, about 1 minute.
TO FINISH THE CAKE:
Spread frosting evenly over cake using an offset spatula, and sprinkle with walnuts (optional). Cut zucchini cake into squares and serve.