Thanks. That would definitely work but my situation is slightly different. I am using a viewport with its own world to arrange these shapes so it's not a grid, it's world space.
I have since solved the problem like this:
When placing a shape, I check to see if there are any overlapping areas.
If there are, I take the returned polygons and use intersect_polygons_2d to generate the intersecting areas.
Then I check to see if the combined area of these intersecting areas is zero.
This kills two birds with one stone. I now know if the shapes are overlapping or just touching.