Preheat oven to 350°F. Line a 9×13-inch baking pan with parchment paper or grease lightly.
Make the crust/topping: In a large bowl, whisk together flour, sugar, baking powder, and salt. Cut in the cold butter using a pastry blender or fork until the mixture resembles coarse crumbs. Add egg and vanilla; mix until crumbly but moist enough to hold together.
Form the crust: Press about two-thirds of the crumb mixture into the prepared pan to form the base.
Prepare the apple filling: In a large mixing bowl, combine apples, sugars, flour, cinnamon, nutmeg, and lemon juice. Stir well until the apples are fully coated.
Assemble: Spread the apple mixture evenly over the crust. Sprinkle the remaining crumb mixture evenly on top.
Bake for 40 to 45 minutes, or until the top is lightly golden and the filling is bubbling.
Cool completely before adding glaze or slicing.
Optional glaze: In a small bowl, whisk powdered sugar, milk, and vanilla together until smooth. Drizzle over cooled bars.