There are probably compounds that do degrade unpleasantly; but I've never heard of any. Also, any compound that degrades over time to form toxins would likely have dangerous metabolites as well, making it an unlikely medicine.
Note, though, that there is another possible danger. Antibiotics, antivirals, and antiretrovirals are all supposed to be taken at full strength, in full dose, for full period of prescription, to help prevent the development of resistant strains. Using medications of unknown strength, partial doses, or limited durations is a bad idea for you, and for the population at large.
If the medication in question is a painkiller, antihistamine, sleep aid, etc. go ahead. Worst case scenario is it doesn't work. If it is an antibiotic, antiviral or antiretroviral, don't screw around, it's a bad idea for everybody. If it is for some serious condition, you probably shouldn't be self medicating, much less with pills of unknown strength.