What's wrong with my 16x2 LCD program and solder?
In general, seeing the boxes like that on these character LCDs often is a contrast issue. As noted in the comments, AnalogWrite generates a PWM pulse train which won't correctly control the contrast. If you can't get a potentiometer, try using two fixed resistors as a voltage divider to try getting closer to a usable contrast level. I'd start with two equal resistors to give 2.5 volts to the contrast pin.