If hospitals and universities should be exempted from a law if they have ties to religious organizations, then either those organizations should divest themselves of those ties, or the law should be written so that it is not the religious organizations themselves which enforce the law. But are those hospitals and universities also exempted from anti-discrimination laws, or laws regarding labor practices?
The founding fathers purposely mentioned neither God nor religion in the original Constitution, preferring instead to mention religion only in an amendment. The establishment clause in the first amendment prohibits the government from preferring one religion over another, but also prohibits preferring religion over non-religion, or non-religion over religion. At the same time, the amendment bans Congress from making laws "prohibiting the free exercise thereof."
Exempting churches, temples and synagogues from laws regarding contraception gives those organizations the free exercise of their religions demanded by the first amendment. But institutions which serve secular purposes (health care or education), and which employ people without regard to religion, cannot be treated differently depending on whether or not they have religious ties. Shifting funding for contraception onto a third party satisfies the establishment clause as well as the free exercise clause. Removing the requirement for contraception funding altogether would be establishing a preference for religion; that requirement was put in to serve both the interests of citizens and of the state, and was not put in to establish a religious or non-religious preference.