I was changing out a lighted switch yesterday and found it odd that it is actually just a switch loop, with no neutral. The switch is not solar powered, so what is powering the light if just the hot is running to it?
The light in the switch is across the terminals of the switch. When the switch is off there is voltage from the hot through the switch-light and to neutral through the light fixture. The light fixture draws enough current to excite the neon in a small bulb but the current is limited. There is often a resistor in series with the small neon bulb.
If there was a short, then the breaker would trip, but as for the flickering light in the lightswitch, it would just mean that the bulb in the switch is near its life end, not the bulb in the fixture.