Are connected doubled (4 pawns on 2 files) a weak structure? It seems to me to be a very solid structure that can play very good in the endgame.

Example: pawns on c2, c3, d2, d3.
It is a solid structure indeed, avoiding one of the most important weaknesses of doubled pawns, which is that they're generally hard to protect. Also, they're less easy to block than just a c- and d-pawn, since the backward pawns can attack enemy pieces on the blocking squares.

However, this structure only influences the b-, c-, d- and e-files, while a 'regular' connected pawn structure influences 6 files. Such a structure is also more likely to be able to force breakthroughs. Everything depends on context, as user1583209 notes, but in general it's better not to have doubled pawns.