Several problems exist.1. What is a "square wave?" (in air)
2. What do you mean by "reproduce a square wave."
a. How do you "produce" a "square wave" (whatever that is) on a speaker to begin with?
b. How do you produce a "square wave" input signal (we know what that is, at least mathematically)to a speaker?
Mathematics can easily describe a square wave, but mathematics also assumes a continuous world. However, the world is not continuous, but discrete. Even if you assume that space and time are continuous, "air" is not, at least on the microscopic level. Mathematically a square wave is discontinuous, but the world (as seen by mathematics) is essentially continuous. However, a "shock wave" is a "discontinuity" in the air caused by something travelling through the air ***faster than the speed of sound in the air***. This almost closes the question right here. If you could make the piston of the speaker move any way you want it to (without consideration of how you do it), then what is the motion of the piston that would create a "square wave," whatever that is??
How do you produce a signal to the speaker that is a square wave signal? Certainly not with electronics. Electronics is closer to being continuous than air. A person throwing a switch on and off very rapidly could not produce a square wave signal, so certainly no transistor nor tube could.