Preheat the oven to 350°F. Toss apple slices with lemon juice in a large bowl. Add brown sugar, cornstarch, apple cider, pumpkin-pie spice, vanilla, and salt.
Transfer apple mixture to a 2-qt. baking dish. Cut butter into small pieces and dot over apples. Cover mixture with foil, and bake 1 hour 15 minutes. Remove foil, stir, and continue baking, uncovered, until apples are very tender and caramelized, about 15 minutes more. Let cool at least 30 minutes, and serve with vanilla ice cream, if using.