In general, layer combination operations, blur, defocus, etc. must be done in linear space. Read this, in the light wins part, it will explain it better. About your problem you can do this:
-Place the colorspace node at the end of your composition, this will cause your background texture to also be affected by the view transform, so you can do a reverse transformation. After the background texture node but before the alpha over, place another colorspace node that transforms that texture from the view transform to linear space (AgX → Linear rec.709). Since the final node of the composition is Linear rec.709—>AgX that would become a no-op (it works in several cases, although not in all, it is a hack). With this you should no longer have those lines.
Regarding the shadow catcher part, it is the first time I use it but when modifying the scene I noticed that if the lights affect the plane with shadow catcher (unchecking shadow catcher in the lights) edges appear on the cube. In the end, testing compositions I verified that the shadow catcher pass must be composed before doing alpha over. In your case it is only necessary to do the inverted transformation, but I still mention this in case something similar happens to you and you don’t know what to do.