How do safety labels on light fittings work with energy saving bulbs?
The safety concern is about heat, not light.  For the safety label concern, you can put 40 actual watts of whatever you want in there.

But the real world is a bit more complex.  Incandescent and halogen will run hot with little fuss.  CFL's and even more so LED's have electronics that degrade under heat, and LEDs loose efficiency with heat.  This is why both perform quite poorly in can lights and enclosed fixtures.

All that said your 28W halogen in a 40W fixture is just fine.
I'd stick to a 18W or less CFL or LED for operation heat (not safety heat) reasons.