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.
Life transference doesn't work with glyph of warding at all
Glyph of warding says:
The spell must target a single creature or an area.
However life transference actually has two targets: you, the creature that is harmed, and the other creature who is healed:
You sacrifice some of your health to mend another creature’s injuries. You take 4d8 necrotic damage, and one creature of your choice that you can see within range regains a number of hit points equal to twice the necrotic damage you take.
Being damaged or affected by a spell is generally considered enough to be considered a target of a spell. Thus, it shouldn't qualify to go into glyph of warding at all.
The above is what I view to be correct RAW and would run at my table, but because it is not explicitly declared who the targets are, your DM may disagree and rule otherwise. If they do, see below.
If your DM rules that the caster is not a target it would work
As J.A. Streich's answer also says, if your DM rules that the caster is not included in the targets of the spell then it qualifies to be put into the glyph of warding. The way it would work is that upon casting, nothing would happen except the spell being stored in the glyph.
The spell being stored has no immediate effect when cast in this way. When the glyph is triggered, the stored spell is cast.
Then, when the glyph is triggered, the caster should take the damage (because they are the "you" who cast the spell) and the triggerer should receive the healing. The glyph doesn't cast the spell, you still did. The effect is just taking place later.
Best Answer
You cannot get help with storing a spell
The glyph of warding spell states:
This shows that "you" (the caster of glyph of warding) must cast the stored spell when creating the glyph, not somebody else.
That said, houseruling this as an option probably won't break your game by any means. It does let the party split up the spell slots required and it makes it so that only one member of your party needs to know the spell for them to make full use of it. This is a flat buff to the spell.
One potential problem is that this allows spells from classes that ordinarily can't get glyph of warding to store those spells in the glyph. I don't believe this would have significant impact and it is technically already possible through the Bard's Magical Secrets feature but that's a much higher tax for the Bard.
An additional benefit mentioned by user @Vigil is as follows: Say casters in the party only have one fifth level spell slot, ordinarily then, you could not store a fifth level spell, but now you could by having separate casters use up their own separate slot. This always applies to ninth level spell slots, and to any spell level for which the party's casters currently only have one slot. Note that doing this is technically already possible if a Sorcerer uses their Flexible Casting feature (though this only works for spell levels 2-5), and again, like the Bard, there is a much higher tax for the Sorcerer (Sorcerer's do not ordinarily get this spell so they would need to multiclass).
The houserule buffs the spell as only one member of the party needs it, and it allows spell slots to be split up as well as allowing any spell to be stored. It also makes the the rather niche uses mentioned above available to all casters, not just Bards and Bard-Sorcerer multiclasses.