Professor Moriarty doesn't believe that the Enterprise exerted any effort in solving the conundrum that ended up trapping him 4 years earlier, and it's easy to believe him. That said, the idea of bringing him back from one of the more inspired season 2 episodes was a good one.
Moriarty is a "worthy adversary", capable of matching wits with Picard. And indeed, he plays quite a ruse - one that will surprise the viewer quite a bit the first time. Picard's countermaneuver is just as clever, and perfectly appropriate.
The ending is a charming one, as Moriarty and the Countess fly off into what they imagine is endless space. As the Enterprise officers speculate, who knows if they themselves are not living a fiction? Barclay's "test" of that question wraps things up perfectly.