As long as the toilet is not distorted against the wall, it probably will be okay. Note, often in the summer, but it can happen in the winter, too, without much room behind the toilet, if the cold water going into the toilet is super cold or the humidity is really high, you might get some condensation, and with little to no room, it could grow some mildew behind. Note, most modern toilets, unlike the older ones, do not dump all of the water in the tank, so at least some of it is room temperature when the fresh stuff comes in unless it has recently been flushed. So, with the water warmer, most people have fewer or no problems with the tank sweating unless it's a high use toilet, or the flapper valve leaks, and it runs constantly.
FWIW, the typical outlet of most toilets is a little over 2", and the hole in the toilet flange is at least 3"...there's often enough slop to shift the toilet at least some...1/4" should be easy, 3/8" might be possible.