question: does the superhero in question need to solve it while time itself is still working, or can they manipulate time itself?
in either case, it'd probably be the flash (wally west), since he can technically do both. But if someone has access to the Time Stone (and if they're smart, I wouldn't put it past them to intuitively solve a rubik's cube if they've never done so prior), they could, in theory, just stop time (in a particular place maybe, i have no clue how stopping time on a multiversal scale would work, and trust me, i've pondered the question several times), solve the cube, and start it again. But that once again depends on how the environment would perceive time around them; would they retain their consciousness, or would it stop and start abruptly, due to which it would seem like no time had passed at all?
tl:dr; the flash (wally west), or literally anyone with knowledge of the rubik's cube and access to the time stone.