Whisk together flour, baking powder, baking soda, salt, cinnamon and nutmeg.
Beat softened butter, brown sugar, and vanilla with an electric mixer at high speed until pale and fluffy, 2 to 3 minutes.
Add eggs 1 at a time, beating well after each addition, then beat in applesauce.
At low speed, mix in flour mixture until just combined, then stir in walnuts or raisins if using.
Spread batter evenly in pan and bake until golden-brown and a wooden pick inserted into center comes out clean, 35-40 minutes.
Cool in pan 15 minutes. Run a knife around edge of cake to loosen, then invert onto a plate.
Re-invert cake onto a rack to cool completely.