Python 2, 528, 417, 393393, 381
Very long, bruteforce solution. It works but that's about it, the universe may end before getting the result for the last test case.
exec"fromexec u"from itertools import*;m=map;g=@w,n:([[w]],[[w[:i]]+s#i?range(1,len(w))#s?g(w[i:],n-1)])[n>1];r=@x:set(m(sum,[x[:i]#i?range(1,len(x))]));f=@w:1-all(m(@(x,y):not x&y,zip(m(r,w[:-1]),m(r,w[1:]))));a=@s,h:['\\n'.join([''.join(['[%s]'%(' '*(s-1)*2)#s?r])#r?o])#p?permutations(s)#o?g(p,h)if len(set([sum(r)#r?o]))<2 and~-f(o)][0]".replacetranslate("@","lambda{64:u"lambda ").replace("#","35:u" for ").replace("?","63:u" in "}) a is the main function:
>> a([1, 1, 2, 2], 2) '[][ ]\n[ ][]'