The mission to repair the Hubble was critical not just for the sake of the project, for for NASA's reputation. With the destruction of Challenger in 1986 and the massive SNAFU of the Space Exploration Initiative proposal in 1989, the troubles with Hubble in 1990 was basically the last straw. Indeed, the astronauts who went out on that particular mission that that the future of the American space program was in their hands.
Had the mission to repair Hubble failed, NASA's credibility would have been shot with both Congress and with the general public. While I can't see any realistic scenario in which the space program is terminated altogether, it would have become increasingly difficult for NASA to maintain a budget necessary for an extensive program.