The challenge doesn't require it to be! It only required that the card can "go in the command zone", which Enshrine directly does.
It isn't Legendary, so its inability to be your commander is no more relevant to the challenge than a Dungeon's inability to be your commander.