In practice I buy the cheap versions of medicine rather than the advertised brands. This makes them cheap enough that I don't care about the cost of throwing them away unused after a year or two.

I'd expect them to retain some potency, albeit reduced, more or less indefinitely. One problem is that although you know their potency is reduced, you don't know by how much. You might find your usual dosage doesn't fix your headache, and then be tempted to try a double dose, when in fact the potency hasn't yet halved, leading to an overdose.

I'm not a gambling man. In a survival situation I wouldn't throw expired medication away, but I would only use it at the standard dosage. If that turns out to be not strong enough any more, tough; it's better than nothing. And if it's something esoteric that I don't think I understand, I would throw it, in case it decomposed over time into something dangerous.
_________________________
Quality is addictive.