Ignoring the stress aspects caused by using Wish in this way, this is the important part of the spell for you:
You might be able to achieve something beyond the scope of the above examples. State your wish to the DM as precisely as possible. The DM has great latitude in ruling what occurs in such an instance, the greater the wish, the greater the likelihood that something goes wrong. This spell might simply fail, the Effect you desire might only be partly achieved, or you might suffer some unforeseen consequence as a result of how you worded the wish. For example, wishing that a villain were dead might propel you forward in time to a period when that villain is no longer alive, effectively removing you from the game. Similarly, wishing for a legendary magic item or artifact might instantly transport you to the presence of the item's current owner.
So short answer, yes, the spell can do what you want but the DM gets the final say.
For something like allowing a PC to change their spells I would hope the DM would say yes to your request without trying to trick you.