Say you have a Wizard 7/Bard 9. You gain your 17th level and choose to gain the level in Bard (which grants you Magical Secrets). According to the Multiclass Spellcaster: Spell Slots per Spell Level table, you now have a single 9th level spell slot. Can the spells you choose from Magical Secrets be 9th level spells even though you can only cast up to 5th level Bard spells?
You only have one pool of slots
You cast whatever spells you can cast, in whatever manner you cast them. They use slots, which are a generic resource independent of your specific spellcasting class. There aren't 'Wizard' or 'Cleric' slots, for example - just 'spell slots'. So your PC might cast only Eldritch Knight spells with all their slots or only Wizard spells with all their slots or some combination of both.
So, yes, you should ignore the class tables and just look at the table for multiclass spellcasters.
It's complicated but maybe you can cast these four spells if you multiclass
You've already noted the Theurgy Wizard feature that is granting you the 17th level cleric domain feature. So, if you picked the Arcana Domain, you would gain the ability you quoted (I will add emphasis)
At 17th level, you choose four spells from the wizard spell list, one from each of the following levels: 6th, 7th, 8th, and 9th. You add them to your list of domain spells. Like your other domain spells, they are always prepared and count as cleric spells for you.
So what does this mean? You add these four spells to your cleric domain spells. The issue is, you never got the Divine Domain cleric class feature or, in particular, the Domain Spells feature. The only interaction with Domain Spells that the Theurgy wizard has is from the Arcane Initiate feature:
(...) whenever you gain a wizard level, you can replace one of the wizard spells you add to your spellbook with a cleric domain spell for your chosen domain. The spell must be of a level for which you have spell slots. (...)
Given this, there are two ways to interpret what the Arcane Mastery is giving a Theurgy Wizard:
The first idea is that looking at the Domain Spells feature for a cleric...
Once you gain a domain spell, you always have it prepared, and it doesn’t count against the number of spells you can prepare each day.
...the Arcane Mastery sentence "Like your other domain spells, they are always prepared and count as cleric spells for you." is just a reminder of what being a domain spell means for a cleric. So, like other domain spells, since the Theurgy wizard does not actually have the Domain Spells feature, a Theurgy Wizard does not have these 4 spells always prepared and this simply adds these 4 spells to the possible choices one can make with Arcane Initiate (effectively making the Arcane Mastery ability mostly useless for a single classed Theurgy wizard).
Still following this interpretation, if you choose to multiclass into cleric, now you do have a Domain Spells feature so you should also have the 4 chosen spells prepared as a cleric, allowing you to cast them once you have the available multiclass slots. Otherwise,if your multiclassing does not include cleric, you would not have these 4 spells always prepared.
The second line of thought is that this is a more specific ability that should work regardless of the lack of the Domain Spells feature. You could also consider that without a Domain Spells feature, Arcane Mastery is adding these spells to an empty list.1 Regardless, you become a 14th level wizard that always has these four spells prepared, and they count as cleric spells for you.
This means that because you are multiclassing to get spell slots of a high enough level, even if you have no cleric levels, you should still have these cleric spells always prepared and available to cast.
Conclusion and comments
I would recommend the first interpretation I presented because it creates less confusion and it seems more natural to me. In my opinion, unless I missed something, there really isn't much more you can go to in terms of what the rules are saying and it's going to be up to how people interpret what is written.
Since you state that you like homebrewing, I will suggest what I see as the root cause of this mess: Theurgy allows a wizard to obtain arbitrary (meaning from any cleric domain) features from a subclass for a different class.
When you just give a class features from a subclass from another class, you might run into issues when those features depend on other class features (that you might not have remembered to provide). This was probably not well thought out when creating the Theurgy Wizard. Consider also the Order Domain on a Theurgy Wizard. The 17th level feature requires you to deal Divine Strike damage which the wizard never gets access to, making it unusable.
In short, don't just give features from a subclass to a different class (or be extremely careful and selective when doing so) because they might not make much sense otherwise, as is the case here.
1. Suggested by John Clifford in a comment