In an 8-1 decision, the Israeli Supreme Court ruled that the Tal Law is constitutional. To keep things simple, the Tal Law pretty much allows broad deferrals to anyone who learns in a Yeshiva until the age of 21.
The interesting ruling was a concurrence by Justice Asher Grunis, who argued that the Tal Law was Knesset legislation, and it is not the place of the Court to strike down majority legislation.
I have to agree. In Israel, where there is no Constitution, the Court's authority to rescind legislation is limited. This arrangement was passed by a majority of the Knesset, and the Court should not be substituting its judgment to determine what's the better policy.
In the US, however, this law would be found unconstitutional. Despite the Court's historical deference to the military, this exclusion is religion-based, and would likely be found to implicate the Establishment Clause. Despite the existence of permissible accommodations, this exemption is very broad and a more neutral law would exempt anyone whose belief system opposes serving in the military.
That might be a better solution in Israel as well. Instead of allowing a broad, class-based, deferral policy for Chareidim, why not just allow anyone whose religious beliefs run counter to army service to avoid the draft? Sure this law would lead to more people avoiding the army on spurious grounds, but the government could counter that by adding more incentives for army service (although some might argue that would discriminate against people on religious grounds). The government could give greater benefits to families with one parent who served, or more it easier for someone with a certain number of years of army service to enter civil service, etc.
People might still resent Chareidim for avoiding the draft but that's going to happen as long as they stay out of the army. That's their choice to make.