Allowing divine casters access to Boon of Spell Mastery should be balanced
In the DMG, p. 287, there's a section called "Changing Spell Lists", which includes the following:
Modifying a class's spell list usually has little effect on a character's power but can change the flavor of a class significantly.
If we take this to mean that there are no inherent balance issues with swapping spell lists around, then by that reasoning, allowing different classes access to this Epic Boon should be balanced, as it would be for a wizard who uses the druid spell list (using a houserule as per the above quote).
In fact, as it stands, the Divine Soul sorcerer can already use this to cast any 1st level spell on the cleric spell list. That said, the Divine Soul sorcerer archetype, as well as the warlock pacts you mention in your question, were all released after the DMG was released.