Preheat your oven to 350°F (175°C). Grease and flour a 9x13-inch baking pan.
In a large mixing bowl, combine the grated zucchini, peanut butter, granulated sugar, brown sugar, vegetable oil, eggs, and vanilla extract. Mix until well combined.
In a separate bowl, whisk together the flour, baking soda, baking powder, salt, and cinnamon.
Gradually add the dry ingredients to the wet ingredients, mixing until just combined. Be careful not to overmix.
If desired, fold in the chopped walnuts or chocolate chips.
Pour the batter into the prepared baking pan and spread it evenly.
Bake for 30-35 minutes, or until a toothpick inserted in the center comes out clean. Allow the cake to cool in the pan for about 10 minutes before transferring it to a wire rack to cool completely.