It depends on how you use the Wish
Wish has, principally, two different classes of use:
- Duplicate the effects of a spell
- Cause something else to happen; take backlash damage from the Stress of the spell
This means that, in practice, you have two options for bringing a Glyph of Warding into existence:
- Duplicate a Glyph of Warding spell exactly as written, meaning you still need to use the second spell slot and are limited to providing only spells that you are capable of preparing (and have prepared at the time you cast Wish
- Create a Glyph of Warding with whatever spell you want (and maybe an additional effect? It's your wish...), no longer needing to spend the second spell slot or have the spell prepared; take backlash damage from the Stress of the spell.
There is one wrinkle in the former use of the Wish though:
The basic use of this spell is to duplicate any other spell of 8th level or lower. You don't need to meet any requirements in that spell, including costly components. The spell simply takes effect.
What, exactly, constitutes a "Requirement ignored by Wish" is the subject of considerable debate. Based on that post, Requirements is here intended to refer to things like cast-time, material components, spell lists, preparation, etc.. I don't think it would permit you to ignore the requirements to
- Have the spell that you plan to place within the Glyph prepared
- Be capable of spending the necessary spell slot to cast the spell you plan to place in the Glyph
Unless, of course, your DM decides to rule that those requirements can be handwaved as part of the "ignore the spell's requirements" stipulation.