I have not played New Super Mario Bros. U (I have played all the prequels) but it doesn't have the charm of Rayman Legends. There is so much variety packed in Legends from mini-games to unique music levels to fun platforming compared to the same-old that U has.
I have the PC version and it's great other than UbiSoft once again shoving their garbage UPlay DRM onto it. I might buy the PS4 version someday. I also have Rayman Origins, which Legends has some levels culled from as extras.