Preheat oven to 350 degrees F. Coat a 9-inch x 13-inch pan with non-stick cooking spray.
In a medium mixing bowl, stir together flour, baking powder, cinnamon, nutmeg, and salt until combined. Set aside.
In a large mixing bowl, beat together butter, sugar, and brown sugar for 1 to 2 minutes until smooth. Add eggs and vanilla and beat to combine.
Add the dry ingredients to the wet ingredients in 2 additions, mixing until just combined after each addition. The batter will be thick.
Use a wooden spoon or a spatula to stir in the apples. Transfer the cake batter to the prepared pan and spread evenly.
Bake for 40 to 45 minutes, or until a toothpick inserted in the center comes out clean. Carefully remove from the oven and let cool on a wire rack for about an hour, or until about room temperature.
Cream Cheese Frosting:
In a large mixing bowl, beat together cream cheese, powdered sugar, vanilla, and cinnamon until smooth. Add milk as needed, until desired consistency is reached.
Spread frosting over the top of the cake in an even layer. Sprinkle with more ground cinnamon if desired.
Notes
The batter will be thick, that's okay. The apples will secrete moisture into the batter as the cake bakes.