>>317113894
Select edges on one that looks the most square-ish and scale them on each axis to 0 so it becomes a perfect square. Once you've done that select your perfect square first and then select everything else and right click, follow active quads and it should lay everything out flat.

There's also an addon called UVsquares that basically does it for you.