Resistors have a voltage rating, independent of the power they are dissipating. For small 0.25W resistors it is 250VDC, for a 0.3W metal film generally 300VDC, for a 0.5W one generally 500V. You get high voltage resistors that have ratings of 1000V, 2000V and higher. Most SM resistors have much lower ratings, typically around 150V or less. Just take a note of this in designing the divider, as you need to not exceed this voltage or they probably will arc over internally, and eventually go open circuit.