I understand that being flanked has a negative impact on defense. But is having the cover on the wrong site (opposite of the enemy) worse than standing completely uncovered, or the same?
To check that I interpret the question correctly: I think you are asking whether there is any difference between
Enemy --- Player
Enemy --- Player --- Cover
The answer to that is "no", in either case the enemy will have an increased critical hit chance and the cover's defense will not apply.
Flanking gives a critical hit bonus to the attacker. It is better to be out of cover than to be flanked.