Solution:
Step-by-step:
Let us introduce some basic logical steps. Since cells next to a wall cannot contain intersections, we can deduce the green lines from the black lines in the following picture
With that in mind, we can make the following initial deductions
Next, let us look at the yellow cell in the above picture. If it continued upwards, the cell next to it would also have to be a corner from left to up and, consequently, the purple cell could not be continued legally. Therefore, the yellow cell must continue straight and we can make some more easy deductions based on the square requirement of intersections.
We can make some more easy deductions on the right side as well as the lower left.
Now, we cannot continue up from the yellow cell, because we would be forced to have an intersection with that rectangle and it is not square. Therefore that cell must continue straight and the cell above it must turn left. Again, we can make the same deduction for the cell on the left of the yellow cell, and it must continue straight again.
Again, the yellow cell cannot continue up, because then the cell on its left would also have to be a corner from left to up and there would be no way of legally continuing the rectangle with the purple cell. However, it also cannot turn up from the next cell because it would immediately force either the rectangle above the yellow cell or the rectangle above the purple cell to share sides (or corners) with other rectangles. Therefore the whole bottom row is part of the same rectangle. Now, this big rectangle is actually forced to go through the whole boundary because otherwise it would have to intersect with other rectangles. With that, we can also make some other easy deductions.
And some more
Now, if we look at the yellow cell, it cannot go straight horizontally because there would be no way of forming a square of the rectangle. Therefore, it must go up and since the rectangle must be two cells tall, it cannot intersect to the left but must instead go right.
The yellow cell in the above picture must be an intersection, which forces some bigger squares.
It is easy to find the only way to fill the remaining area with two rectangles, which gives the solution.