Yes you can cast spells that target self into the glyph
Spells that target "self" meet all the criteria for allowed spells
Glyph of Warding describes all the limitations for which spells can be stored in it:
You can store a prepared spell of 3rd level or lower in the glyph by
casting it as part of creating the glyph. The spell must target a
single creature or an area.
There are no other limitations.
Since spells that target "self" only target a single creature explicitly they meet the single-target criteria.
Targeting - specific beats general
One might wonder how a "self" spell would be targeted upon the glyph being triggered, but the spell covers that as well:
If the spell has a target, it targets the creature that triggered the glyph.
Does a spell that targets self have a target? Yes. So, according to the spell that self spell will now target the creature that triggered the glyph.
Specific beats general. So this supersedes the restriction that self spells only be able to target the caster.
In order for this spell to function as designed, it necessarily supersedes the normal targeting rules for spells with its description.
It's worth noting that this spell also necessarily supersedes several other major general rules (Spellcasting effects, concentration) with its specific effects in order for it to function.
Thus, there is absolutely no reason why this isn't fully allowed.
The spell's wording has changed
It is worth noting that an older version of the spell description began with the line:
When you cast this spell, you inscribe a glyph that harms other creatures.
However, the spell has been the subject of errata, and the first line now says:
When you cast this spell, you inscribe a glyph that later unleashes a magical effect.
This appears to be a confusion point.