Preheat oven to 350°F (175°C). Peel and slice apples into 1/4-inch wedges. Toss with lemon juice, sugar, cinnamon, nutmeg, and flour in a large bowl. Spread into a greased 9x9-inch baking dish.
In a medium bowl, mix oats, flour, brown sugar, cinnamon, and salt. Pour in melted butter and vanilla (if using), stirring until crumbly.
Sprinkle topping evenly over apples, pressing lightly.
Bake for 35-40 minutes, until topping is golden and apples are bubbling.
Cool for 5-10 minutes. Serve warm with ice cream or whipped cream.