The only RAW vs RAI semantics issue I could see to argue with it is earth spell. Its description is prefaced by saying that it enhances the effects of heighten spell, but it then doesn't specify that a spell's level has to be increased specifically by the heighten spell feat, so there could be a bit of argument to be had as to whether enhancing it with sanctum spell will have an effect. Even then, heighten spell is a prerequisite for earth spell so I'm assuming you're just heightening, say, a silent image to 8th or 9th level which would allow the full cheese to work anyway. I only mention this because someone in another thread mentioned combining sactum spell with earth spell to boost something's level by 2.
Anyway, if your DM has decided that Miracle is a valid sor/wiz spell for your character then yes, you should be able to cheese a level 10+ spell slot to shadow cast it like this.
It would not work for Wish, though, as Wish is a universal spell. It does not belong to any school of magic, and is therefore not a valid target for an ability that can only mimic specific school.
Whether you can then metamagic a spell that's cast via Miracle, though? I don't know if that's normally something that you can do, and I don't see why shadow casting the spell should have an impact on whether you could do that.