What do these lines/square brackets mean under the notes? It seems to be grouping them together somehow, but what exactly does it mean?
Those are pedal markings. Use your right foot to press the right pedal on the piano. Everytime you get to the end of the pedal markings, release your foot, then quickly press back down if there is another one that follows.That way the piano doesn't sound that messy, and it has a dreamy feeling to it.
I'd guess they were badly-written sustain pedal markings. Except that they don't make much musical sense. They would merely blur the RH notes - and if you wanted that effect, why not in the first bar too? - and aren't necessary to achive legato in the LH. I wouldn't worry too much over what isn't a very well thought-out bit of notation.