Preheat the oven to 350 degrees. Prepare a 9x13 baking pan with parchment paper spritzed with nonstick cooking spray.
Whisk together the flour, baking powder, baking soda, salt, and apple pie spice.
In a mixing bowl, beat the butter until fluffy, about 3 to 5 minutes. Scrape down the sides and then add the sugar and brown sugar, beating until completely combined.
To the mixing bowl, add the eggs and vanilla. Beat until incorporated. Then add the applesauce and milk, beating until mixed well.
Add the flour mixture to the mixing bowl and beat just until combined.
Fold in the raisins and walnuts.
Transfer the batter to the baking dish and spread evenly.
Bake for 30 to 35 minutes or until a toothpick inserted returns clean.
Cool completely in the baking pan on a wire rack.
Lift the cake from the baking pan using the parchment paper. Gently cut into squares using a serrated knife.
Top with powdered sugar or whipped cream if desired.