Preheat your oven to 350°F (175°C). Grease a 9x13-inch baking pan or line it with parchment paper.
In a medium bowl, combine the flour, baking powder, baking soda, cinnamon, nutmeg, ginger, and salt. Whisk together and set aside.
In a large bowl, cream the softened butter and granulated sugar together until light and fluffy. Add the eggs one at a time, mixing well after each addition. Stir in the vanilla extract.
Gradually add the dry ingredients to the wet mixture, mixing just until combined. Fold in the grated zucchini and nuts, if using.
Pour the batter into the prepared baking pan and spread it evenly. Bake for 25-30 minutes, or until a toothpick inserted in the center comes out clean. Allow the bars to cool completely in the pan.
While the bars are cooling, prepare the frosting. In a medium bowl, beat together the cream cheese and butter until smooth. Gradually add the powdered sugar and vanilla extract, mixing until well combined. If the frosting is too thick, add milk a little at a time until you reach your desired consistency.
Once the bars are completely cool, spread the frosting evenly over the top. Cut into squares and serve.