My thoughts are that maybe the TB antigens necessary to produce an immune response are proteins; therefore they can be digested in the stomach and small intestine. But I may be wrong though. I am confused why I can't say the same for polio vaccine.
There are different polio vaccines - one live (attenuated) vaccine which is given orally and one inactivated, which is injected. The main reason for using the live orally vaccine is that it provides excellent immunity (better than the inactivated) since it uses the natural infection route (oral-faecal) in the body where it enters through cells in the intestine. Besides that, it is also much less expensive than the inactivated form, which is a big thing when doing mass immunisations in developing countries.
The live vaccine, however, may mutate back into a more infectious form as you shed live (attenuated) viruses after the immunisation, so these are not used anymore. Now we are very close to the eradication of the poliovirus. The risk of getting new infections is viewed as being too high these days. See this paper for more information: "Vaccine-derived polioviruses and the endgame strategy for global polio eradication."
The reason why the oral polio vaccine is not digested in the stomach is that the poliovirus itself has adapted such that it can survive the acidic conditions of the stomach. By using an attenuated (mutated to not cause neurological symptoms) version of the virus, the oral vaccine can also survive the acidic conditions of the stomach. For TB which is transmitted not through ingestion but through inhalation, the bacterium is not resistive to the stomach acid and therefore a different vaccination strategy had to be used which requires injection (which, as described in the answer by Chris, is also less dangerous).
As stated by others, polio is primarily a gastro bug, an enterovirus related to Coxsackie and a number of others which produce stomach and respiratory symptoms, as well as various others.
Most polio infections result in nothing worse than a case of "the stomach flu", but in a small percentage of cases the virus escapes from the GI tract and produces neurological symptoms. And in a small percentage of those there is the paralysis that people associate with polio.
Since the route of infection is primarily oral, a live (but "attenuated") polio virus can be administered orally to achieve immunity to the "real" virus. Other diseases are either not spread orally or they do not have live-attenuated vaccines that have been developed. Simply administering the antigens orally would not work, as they would be too dilute and would be quickly neutralized by digestive juices.