Reading through Wikipedia, it seems that evidence of Hitler's cryptorchidism was first put forth by the (dubious) Soviet autopsy in 1970, then through discovery of witnesses and medical records found in 2008 and 2015. So how did whoever wrote the lyrics to the song knew that Hitler has only got one ball, back in the 1940s? More curiously, the lyrics originally said "Göring has only got one ball," but it was somehow changed to Hitler along the way.
This older answer by /u/commiespaceinvader discusses this topic.