It's a Wish, used free-form. It's not limited to just what Polymorph spells can do.
As far as his current state, that pretty much resolves all discrepancies right there. He was transformed via Polymorph into an otter (for a maximum of 1 hour per casting), during which time he was unable to cast, he decided he liked it, and he risked a free-form Wish in an attempt to have that experience permanently while also retaining his spellcasting. Luckily for him, the Wish worked out reasonably well.
Worth noting that regardless of how it happened it would have to have been a free-form Wish rather than a spell-duplication Wish, as spell-duplication Wish is not able to duplicate 9th-level spells, and there are no permanent polymorph effects before then.
But we don't know precise details of how it happened, because there's very little actual information here.
As far as previous lore is concerned, it appears that there isn't any. At least according to the Forgotten Realms wiki, this particular Otter Archmage was created for the adventure itself.
Now, one chain of events that might make sense would be that he was polymorphed, he liked it, he possibly polymorphed himself a few more times, he didn't stop liking it, and so he carefully crafted a Wish that would turn him into an otter capable of spellcasting, which (as a wizard caster capable of casting 9th-level spells) he cast himself.
On the other hand, we don't know that to be true with certainty. The wording in particular is a bit odd here. "His otter form was made permanent" seems to imply that the Wish was used while he was under the effects of Polymorph, perhaps for the first time, thus requiring both another caster and a more complicated Wish. If it was the first time, it would also have required this particular old man to have made a life-changing decision like that, and assembled the necessary effects for it in under an hour, while in the form of an otter. An unusual series of events indeed, though still within the bounds of the possible for high-level D&D characters.
Regardless, it's both beyond the scope of the information we're given and also not terribly important. The text could be read in a number of ways. Regardless of how you read the text, you could do that thing with Wish. No other information has been provided, or is likely to be provided. He's a bit character in a specific adventure, whose most significant feature is that he can be used as an excuse by rules lawyer powergamers who want to abuse Polymorph to make their 12th-level characters able to cast 9th-level wizard spells. I suspect that the wording is awkward just because the person who wrote it couldn't be bothered to put that much attention into the few sentences of description that the archmage was allotted.
If the specific details of the episode matter for your campaign, then it's going to have to be DM adjudication, and that's all there is to it.