You need a bigger soldering iron, as in "more power."
The square connections are in the ground plane of the board. That is the large yellow area they are embedded in. That is a large piece of copper, and there are probably also large copper surfaces on the internal layers of the board.
Copper conducts heat very well, and it also radiates it away.
The large copper areas are basically sucking up all the heat your iron can provide and radiating it away fast enough that it can't get hot enough to melt solder.
The solution is an iron that can put in heat faster than the board can dissipate it.
So, you need an iron with more power.
Many irons are only around 30 watts. You'll need much more than that.
When I've had to do that kind of thing, I borrowed a huge 150 watt iron from my father in law. It isn't intended for electronics, but it has the raw power needed for large copper surfaces.
As for technique, high wattage irons often have wide tips.
I apply some extra solder to the heavy joint with the iron heating just the ground connection.
When that finally melts, I rotate the tip of the iron to heat both pads for that part.
The solder melts pretty quickly, then I can pull the part out. Afterwards (if you need to to replace the part) you can clean the holes with a solder sucker or solder wick.
While you are removing the part, you actually want as much solder as possible on the connection. Removing solder makes it harder to get the part out, not easier.