Heat oven to 350°F Spray a 9-by-13-inch baking dish with the nonstick spray. Line the pan with a piece of parchment, leaving an overhang on two sides; spray the parchment with the nonstick spray.
In a medium bowl, whisk together the flour, baking powder and soda, cinnamon, ginger, cloves, nutmeg, and salt.
With an electric mixer, beat the butter and sugar on medium-high until light and fluffy. Beat in the eggs, then the molasses. Reduce speed to low and gradually add the flour mixture, mixing just until incorporated. Mix in the raisins and walnuts.
Spread the batter in the prepared pan and bake until a toothpick inserted in the center comes out with moist crumbs, 30 to 35 minutes.
Cool completely in the pan. Holding both sides of the paper overhang, lift the cake out of the pan, transfer to a cutting board, and cut into 24 squares.