There are supplies on board that can sustain short term survival (med kits, left over food, etc). There’s also multiple ways of tracking the planes location in real time so rescuers know where to find you and will be on their ways. But from a realistic standpoint, if you manage to get an airliner onto a small island without an airport, chances are you won’t need to worry too much about survival.