Shillelagh is a Druid spell. Quarterstaff is a valid Druid spell casting focus.
Magic Initiate origin feat doesn't say anything specific regarding the cantrips and spell learned regarding spell focus. The spells being added to your prepared spells and being able to be cast with your spell slots implies to me that you can use the spellcasting focus for your class.
DMs can interpret this in a strict manner the way that you have, that there's no spellcasting focus for the spells learned by the Magic Initiate feat, but this seems contrary to how spellcasting works generally. A common interpretation is that you can use the quarterstaff as the spellcasting focus when casting Shillelagh, but I've seen other threads on the web disagreeing with this.
I have reviewed the D&D 2014 and 2024 Sage Advice, and the D&D 2014 and 2024 errata. While the Sage Advice mentions Magic Initiate, there's no comment regarding the spellcasting focus.
Ancoulainn, do you have a D&D 2024 rules reference regarding the spells learned not being castable with a spellcasting focus? I do see other threads elsewhere agreeing with your interpretation, but nothing official.
Reading through other threads that I found by searching the web, the interpretation is that having a spellcasting focus is a class ability and applies only to that class' spells. So, if you do not have a class that grants a spellcasting focus, you cannot use a focus to cast cantrips and the spell granted by Magic Initiate origin feat, as that feat does not grant use of a focus. So the key question is whether the Magic Initiate cantrips and spell being added to your prepared spells means that they can, or cannot, be cast with your spellcasting focus if you have one from your class. I would allow it as a DM, but it is not clear.
The underlying premise of the rules is that they tell you what you can do, not what you can't do. So, if they don't say that you can do something, it means that you can't. It's logically impossible to formulate rules to include everything that does not apply since the amount of nonapplicable scenarios is infinite. Therefore, rules are formulated to include everything that does apply, so if they don't say that something applies, by default, it doesn't.
First of all, yes, having a spellcasting focus is a class or subclass feature. In Chapter 7: Spells under Components -> Material, it says "or the spellcaster can substitute a Spellcasting Focus if the caster has a feature that allows that substitution."
Thus, in order to use your Quarterstaff as a spellcasting focus to cast Shillelagh, you would need a respective class or subclass feature. The Eldritch Knight has a feature that says that you can use an Arcane Focus for your Wizard spells, but Shillelagh is a Druid spell and not on the Wizard spell list. Thus, the Eldritch Knight would need a feature that would allow them to use a Quarterstaff as a spellcasting focus to cast Druid spells, but they lack such a feature.
"
The spells being added to your prepared spells and being able to be cast with your spell slots implies to me that you can use the spellcasting focus for your class." - Yes, the spells are prepared, but it doesn't say that the spells are being added to your spell list. That only happens when a feature explicitly says so. For example, Blessed Warrior says "The chosen cantrips count as Paladin spells for you", Pact of the Tome says "While the book is on your person, you have the chosen spells prepared, and they function as Warlock spells for you", and Nature Cleric's Acolyte of Nature says "This cantrip counts as a cleric cantrip for you". Magic Initiate lacks such wording entirely which means that they do not count as class spells for your class. If it did, it would change Shillelagh into a Wizard spell and you could use an Arcane Focus aka Quarterstaff to cast it, but alas, that is not the case.
Therefore, Shillelagh isn't a Wizard spell. Therefore, an Eldritch Knight cannot use an Arcane Focus aka your Quarterstaff as a spellcasting focus to cast Shillelagh. A Druid or Ranger, who can use a Druidic Focus as a spellcasting focus for Druid or Ranger spells respectively, however, can use that Druidic Focus to cast Shillelagh. But even for Rangers that only works if Shillelagh is obtained via Druidic Warrior because their Spellcasting feature says "You can use a Druidic Focus as a Spellcasting Focus for your Ranger spells" and in order for Shillelagh to become a Ranger spell, you need Druidic Warrior which says "The chosen cantrips count as Ranger spells for you".
That's the official 2024 RAW, not an interpretation. In summary, you would need a class or subclass feature that would allow you to cast Druid spells with a spellcasting focus, be it an Arcane Focus or a Druidic Focus. Eldritch Knights don't have such a feature. Therefore, they can't do it.
As a sidenote, this is also why cantrips from Magic Initiate do not work with a Cleric's or Druid's Potent Spellcasting. They are not Cleric or Druid cantrips and therefore do not benefit from the class feature. So, you can't just pick up Firebolt or Ray of Frost via Magic Initiate and add a +5 to your damage rolls via Potent Spellcasting. That only works when you play a Druid of the Land or Druid of the Sea and acquire Firebolt or Ray of Frost via your Circle spells because they count as Druid spells.
As for "
A common interpretation is that you can use the quarterstaff as the spellcasting focus when casting Shillelagh..." - I have never heard of this. But regardless, RAW, this is incorrect. The PHB says explicitly that using a spellcasting focus is a class or subclass feature, so you can do what that feature says, if you have it, and if you don't have it, you can't use a spellcasting focus at all. And when the feature says that you can use an Arcane Focus as a Spellcasting Focus for Wizard spells, then it means exactly that and neither more nor less.
However, what you allow at your table is entirely up to you. I'm just talking about RAW and they are crystal clear.
As another sidenote, I think there is an oversight here. Warlocks can use their Pact Weapon as a spellcasting focus and it's not even limited to Warlock spells which is another oversight in my mind. Valor Bards can use their weapon as a spellcasting focus to cast spells from their Bard spell list, even though that runs into an issue with Magical Secrets because of the wording which is also questionable with regards to RAI. Bladesingers can use their melee weapon as a spellcasting focus for their Wizard spells. But Eldritch Knights lack a comparable feature - not that it would help in your case - which makes Sword & Board Eldritch Knight builds very difficult, because you have to use your free object interaction to stow your weapon to touch your component pouch or Arcane Focus to cast Fireball - unless you're using a Quarterstaff as your weapon - and then you stand there without a weapon until your next turn. The level 18 feature - Improved War Magic - helps at least with level 1 and 2 spells because you can make an attack afterwards which allows you to draw your weapon again, but that does not help prior to level 18 and not with level 3+ spells. Personally, I would allow an Eldritch Knight to use the Bonded Weapon from the War Bond feature as a spellcasting focus for their Wizard spells which would solve this issue entirely. WotC should make this adjustment as it only requires the addition of "You can use the bonded weapon as a spellcasting focus for your Wizard spells."