And from another site: - Voltage rating : as with wire insulation, make sure this will handle the voltages you care about. In most resistors, you only care about the voltage drop across the resistor, but if the resistor is up against, or can possibly touch, another conductor (such as a ground lug!) or another resistor, you have to worry about the maximum potential between the resistor and the other conductor or resistor.
A film resistor is made by depositing a metal-resistive or hydrocarbon mist onto a (usually ceramic) rod. If endocarps & leads are fitting to the resulting device, the resistance will be quite low. To increase the value of the resistance, the path-length for current between ends is increased by etching away some of the surface material to form a long spiral, either by grinding or with a laser.
The resistor's working voltage is a voltage above which there could be arcing from one part of the spiral to an adjacent part, reducing the effective resistance & increasing current (possibly damaging the resistor).
The outer coating applied over the resistive spiral is a completely separate dielectric to withstand voltage, and is quite a bit thicker than the space between adjacent parts of the resistive spiral. The dielectric strength of that outer coating is what you're thinking of when you worry about the voltage from the resistor to a nearby grounded object, and intuitively you can see it must be higher than the working voltage of the resistor because the thickness/distance is greater than the distance between adjacent parts of the resistive spiral.
Similarly, the working voltage of a capacitor is the dielectric strength of the insulator between plates of the cap; the insulation enclosing the capacitor is almost always thicker.
My feeble mind seems to remember that there is an equation that calculates the maximum voltage allowed. It is something like the square root of power x resistance. ...
That's the formula to find the voltage across a resistor (or load) when resistance and power are known.
Power = Volts2/Resistance, so
Volts = √(Power * Resistance)
Remember this? √(0.5w * 100kΩ) = 223v, and there's always that old rule of thumb about using a resistor rated at least double the normal dissipation. So as PRR pointed out earlier, this implies we usually only have ~100v across a typical 100kΩ plate resistor.
Whether any of us pay attention or not, √(Power * Resistance), which is associated with the resistor's wattage rating, usually takes care of any working voltage issues.