to be honest it depend on the medicine , as a rule never use a vaccine after its shelf life or if it's stored out of optimal storage situation even for a short time . (no matter its colder or warmer than optimal temp)
another matter is the formula itself , I assure you you can use Acetaminophen tablet after its expiry date but you cant use its Suppository or drop or syrup in such cases also the drug itself is important some drugs are just a chemical material and these drugs usually tend to last even after their expiry date but some other drugs are more unstable like some of vitamins or Anti-hypertensive drugs and tend to lose their effect , some drugs are made of proteins and these drugs are also tend to lose their effectiveness after their shelf life or even if the temperature is not optimal .
another matter is that ot all drugs just loose their effectiveness overtime , some of them may be prone to chemical changes and after those change te result agent be a harmful material for the body.