Some technical characteristics are specified considering the lens is focused at infinity, as the exact number of the focal length of the lens. A 70-300mm lens is actually 71-297mm focused at infinity, but focusing on near the minimum distance possible, 300mm can actually be 208mm, for example. Other features like geometric distortion, and would also see venheta focused near or far. The sharpness can also be much lower near the minimum possible distance in non-macro lenses. So real world tests differ from laboratory tests. Other features like geometric distortion and vignetting also vary quite focused near or far. The sharpness can also be much lower near the minimum possible distance in non-macro lenses. So real world tests differ from laboratory tests.
I know from personal experience that a short focus distance increases distortion. My Vivitar 19-35mm gives spectacular 'hall of mirrors' distortion when pointed obliquely towards the subject at close range (19mm on full frame). Distortion is much less pronounced at a longer distance, as it is at a less extreme focal length. The equivalent L zoom would no doubt take a better photo, but not demonstrate the point so well.
In my experience, yes, a lot with some lenses. For example, my 17-55 was stellar for people shots, and weak at infinity. Most tests are done at close distance and can hide some shortcomings (or emphasize others).
This may be not what you were asking, but atmospherics will always impact quality and therefore subject distance will affect IQ... You can correct some lens deficiencies, but you can't change the weather
Of course it depends on what you're shooting, but MTF show best quality in controlled conditions...