X2 capacitors are rated for use across the mains (Active to Neutral - not Active to Earth). They are impulse tested to 2500 volts, and have self-healing characteristics with AC applied. They cannot necessarily self heal with applied DC. If there is enough DC volts and current available, once arcing starts, it will probably not stop until a big part of the capacitor has burnt away. The issues with the mains are that high voltage spikes can happen, and there is a massive amount of energy available.
X2 is nothing to do with direct human safety, but more in terms of being unlikely to cause the house to burn down. You cannot use an X2 or an unrated capacitor to isolate a human from a dangerous high voltage.
The non rated capacitors are fine within a circuit where the maximum available energy is usually limited anyway. They can handle the rated voltage, but in the event they fail, there are no promises as to how they will fail.
Richard.