Heat oven to 325°F and arrange a rack in the middle. Spray an 8-by-8-inch square baking dish with nonstick cooking spray.
Melt 1/2 cup of the margarine in a saucepan over medium heat. When it foams, sprinkle in 2/3 cup of the sugar, 1/2 teaspoon of the apple pie spice, and vanilla extract. Stir over medium heat until sauce is smooth and a deep amber color.
Combine flour, baking powder, and remaining 1/2 teaspoon of the apple pie spice in a large bowl and mix thoroughly. Add remaining 1 cup of the sugar, remaining 1/2 cup of the margarine, and eggs. Beat on medium speed until a thick batter forms. Add soy milk and stir until evenly combined.
Transfer batter to prepared dish and spread over apples. Bake until a toothpick inserted in cake layer comes out clean, about 45 to 55 minutes. Invert onto serving platter and serve warm or room temperature.