dnd 5e – Does a spell cast from a Glyph of Warding with a range of Self have infinite effective range?

This is highly related to this old answer of mine regarding dead men’s switches. That one addresses pre-errata glyph of warding, when surface glyphs weren’t subjected to the spell’s movement limitations, but in games using the errata the same principles apply here. Quoting from there:

A Glyph wards an area or an object. While the trigger can be refined to be conditionally dependent on (almost) anything you want it still probably necessarily needs to interact with the area or object you’ve warded:

You decide what triggers the glyph when you cast the spell. For glyphs inscribed on a surface, the most typical triggers include touching or standing on the glyph, removing another object covering the glyph, approaching within a certain distance of the glyph, or manipulating the object on which the glyph is inscribed. For glyphs inscribed within an object, the most common triggers include opening that object, approaching within a certain distance of the object, or seeing or reading the glyph. Once a glyph is triggered, this spell ends.

The above quote, preceeding the section on refining the trigger, does not indicate that the trigger can be anything but rather that it can be lots of things and also lists several things it definitely can be. If you go outside that list for the basic trigger, you need to confirm with your GM that the new trigger is possible. Unlike the open-ended section on refining triggers, it is not the case that the basic trigger can accomplish what you want.

Furthermore, there is historical precedence for it not doing so; Glyph of Warding in earlier editions of the game, while always very open ended, specified some version of the following clause (taken from AD&D 2.0):

A Glyph of Warding is a powerful inscription magically drawn to prevent unauthorized or hostile creatures from passing, entering, or opening.

which indicates the general scope of potential triggers– they must in some way relate to the warded object or area. Refinement, however, is not nearly so limited.

So, you can get the glyph to cast fire shield on you from any distance, but only if you can interact with the object/area it is warding from that distance.

You could instead get it to cast the spell on someone interacting with it contingent upon you taking some distant action (like, e.g., dying or having at any point since the glyph‘s creation said “flame on”), but it will then go off on the next person who meets the rest of the trigger (e.g. touching it), not you.

You may nevertheless be able to do this– several spells let you interact with objects at a distance– but it is much more expensive to activate (probably takes an action and spell slots) and much more vulnerable to failure (could be prevented via counterspell or otherwise stopping whatever you are using to interact with it) than you seem to be supposing.

It’s also unlikely to work across a 100-mile gap– the only spell that would work at such a distance that I can think of off the top of my head is Gate and at that point Wish to duplicate whatever the Glyph of Warding is holding is cheaper.

That said, this is absolutely a potent and legal use of Glyph of Warding, and one which will likely become significantly better as more material is published for 5e and more theoretical optimization is developed.

Really the only missing piece for free action spellcasting is a reliable player-generatable free-action remote-activation system, and frequent improvements are made on that front regularly at this time.