When a string vibrates, it's wavelength is always twice the length of the string, because the the fundamental is basically the whole string moving up and down, forming half a sine wave.
See? The string also vibrates at all other harmonics of that fundamental.
When you pick a guitar, you excite the string at all harmonics that vibrate that part of the string, relative to their amplitude at that part of the string. If the harmonic is at a node at that part of the string, that is to say if the harmonic has no amplitude at that part of the string when the string vibrates, then that harmonic will not vibrate.
Now,
look at all of these little sines vibrating. That's what the first eight harmonics of a vibrating string look like. Now see all of those sines that are at zero when you hit π/2? You can check the list of functions on the left to see that all of those sines are even harmonics. So following from the second paragraph, second sentence, if you pluck the string halfway across its length, then those harmonics will not sound, and the string will be vibrating
like this.
A square wave is the sum of all of a pitch's odd harmonics, as you've observed. Since plucking the string at its center mutes all of the even harmonics, it follows that the resulting waveform will be a square.
Playing stringed instruments at different parts of the string is a popular way to change the instrument's character. Playing near the bridge will dampen the fundamental, while bringing out the highest harmonics, making the sound thin and tinny. You can selectively dampen other harmonics by targeting other parts of the string as well. Experiment! Stringed instruments are really versatile instruments because of this quality.
(Note, in the second graph, I've also included functions for triangle and square waves if you want to see what the summed harmonics look like.)
This is a mathematical proof of your theory, but if you want to prove it scientifically, just record yourself playing notes on different parts of your string, then look at the waveform in audacity. For the part where you play the middle of the string, the waveform will look significantly more square-like than other parts. Note that it won't look
exactly like a square wave, though, because the body and interior of the guitar shape the wave form just as much as the string does.