Can an Arcane Trickster or Eldritch Knight who takes the Magic Initiate (Wizard) feat cast the first level spell they pick with their spell slots? [duplicate]

Can an Arcane Trickster or Eldritch Knight who takes the Magic Initiate (Wizard) feat cast the first level spell they pick with their spell slots, like a Bard who took Magic Initiate (Bard) can? Or the Wizard for that matter?

Both AT and EK uses the wizard spell list, so one could assume so, but can they?