This might be a myth but when I was a kid I assumed (or was told?) that there was always another space shuttle ready to go if there was a problem with the one in flight. Since SpaceX has nearly perfected quick turn launches, I have to believe that they can get one fueled up relatively quickly.
> This might be a myth but when I was a kid I assumed (or was told?) that there was always another space shuttle ready to go if there was a problem with the one in flight.
I believe it was a myth. IIRC, one of the unusual things about the final Hubble servicing mission was said to be the sight of two space shuttles ready to go at the same time (one for the mission and a second one to be used as a rescue ship if necessary), implying that this wasn't done often (if at all) previously.
Post Columbia accident, most of the shuttle missions were focused on the ISS where the crew could have taken refuge had there been a problem during ascent which prevented safe re-entry.[1]
As you note the Hubble mission (STS-125 with Atlantis) wouldn't have that option available due to its orbit, so NASA had the shuttle Endeavour ready to fly as STS-400 as a contingency.
[1] The plan would have been that crew stranded on the ISS would be picked up by a later shuttle, so NASA was obviously comfortable with the contingency of leaving a crew without transport off for a period of time during an emergency. These were designated STS-3xx missions and would have launched within 40 days of call up. The ISS could have supported the additional crew for 80 days.
This only became true after the loss of the shuttle Columbia on the STS-107 mission in 2003. After Columbia, a rigorous process was put in place for checking the heat tiles on the underside of the orbiter for damage. If damage was discovered, the shuttle crew would shelter aboard the International Space Station for about 40 days until a rescue shuttle came to get them. This mission profile was known as Launch On Need or Contingency Shuttle Crew Support. The rescue missions were numbered in the STS-3xx range. [0]
A different rescue mission profile was needed for STS-125, which serviced the Hubble Space Telescope and couldn’t reach the orbital inclination of the ISS. This rescue mission, STS-400, had to be ready to launch within three days of a problem being found.
The last planned shuttle mission was STS-134, with STS-335 as the LON mission. Since the hardware for 335 existed, NASA decided to fly it as an operational mission, STS-135. At this point there could be no backup shuttle, so 135 was flown with just four crew members who would shelter on ISS and come down one at a time via Soyuz over the course of about a year if the shuttle couldn’t re-enter.
What about the damaged orbiter stuck at ISS? Orbiters were quite expensive, so NASA developed hardware (which was stored on ISS) to attempt a landing of the empty orbiter via remote control. Whatever the probability of success, it was better than zero.
After the loss of STS-107, the investigation board asked NASA to devise a rescue that could have been attempted if the damage had been identified early in the mission. [1] The result was an audacious rescue plan that would have pushed two orbiters, their crews, and NASA itself to the absolute limit. We will never know if it could have been done.