Yeah, you would end up with a spell you can't cast. Fortunately, at level 17, you are not stuck with it forever, because:
Additionally, when you gain a level in this class, you can choose one of the sorcerer spells you know and replace it with another spell from the sorcerer spell list, which also must be of a level for which you have spell slots.
So at level-up, you could drop Wish and replace it with something else. Once you hit 20th level though, if you still have it, you're pretty much stuck with it.
You could at that point ask your DM whether you could replace it as a down-time activity, though. It's not in the books but it seems reasonable that you don't get stuck with it for all eternity when a lesser SorcerorSorcerer would have a way to get rid of it...