I played both versions, so here's what I've got:
Wii U:
Starting out I found the controls rather difficult to use after the previous games like Colors and Generations, but once I got used to them I was doing great. Also glad to see the spindash back! The story left many things unexplained such as how wisps return or what happens to the Deadly Six in the end as they don't seem to die. The parkour system worked very well for me after I practiced with it, and although people complain that they climb up walls that they don't want to, it's as simple as not holding the right trigger, there you go. Smooth 60fps throughout, amazing music as expected for a Sonic game, and it's a ton more challenging like the classic 16-bit games. I'll admit Lava Mountain does go a bit overboard with the difficulty spike, and the game doesn't really explain Sonic's new moves and abilities very well leaving a newcomer in for a rough ride. Personally, I think I liked it better than Generations and Colors both, mainly because it's a breath of fresh air from all the boost-to-win, but that's just me.
3DS:
I heard a lot of negative things about this game, and I was very reluctant to buy it. Being the Sonic fanatic I am though, I ended up doing it anyway and had myself a night of both fun and frustration. The handheld version's controls are rather slippery and loose, and if you've played the Wii U version previously like me, you'll be caught off guard and die a lot. Story's the same pretty much, though a few cutscenes are left excluded for some reason. Parkour isn't as smooth as the Wii U version, but there are a lot more places where it's useful which is why I consider the 3DS version's parkour system to be better than the home consoles. Once again, just my opinion (don't kill me!). In this version, you don't climb up walls unless you have a good amount of speed going or you stand against it and spindash. Another difference is that you can do multiple spindashes when wallrunning unlike the Wii U version. As I played through, the game did have some lag at points but it's not that bad. I'd say this version's difficulty is all over the place, one stage can be simple while the others can be absolute HELL. By hell I'm talking about you, Frozen Factory Zone 3, that level took me 20 minutes because you have to push snowballs and go all over the place in a really tedious pattern. Did I mention 20 minutes is about the same amount of time it takes me to complete Eggmanland in Sonic Unleashed? This version also seems to have a gyroscope fetish because Dimps shoves it down your throat in stages like Sky Road Zone 3 and the AWFUL Special Stages. I had to get up and spin around, by the time I collected all the Chaos Emeralds I felt sick. Lava Mountain wasn't even a world, just a bunch of boss rushes. The final boss however was infinitely superior to the Wii U version, various attacks and if you wait long enough he combines them (I believe he did drill, quake and lazer once while I fought him) so bravo on that one. The bosses overall were better than the Wii U version.
Sorry about the wall of text
guess I got carried away.
In short, Wii U version is far better overall. Wii U - 8/10, 3DS - 6/10 (my opinions as a dedicated Sonic fan)