Artistically, ROTJ also looks rather flat and ugly compared to Empire.
That is entirely subjective. To me it looks great. For example, throne room scenes are visually excellent.
A lot of the flat look has to do with the fact that Marquand came from a primarily television background, in which flat lighting was the norm.
Lighting is pretty much the cinematographer’s job. Of course, the director has some high-level input but I doubt Marquand was telling Alan Hume “I want scenes to look flat” (btw, what does “flat” even mean?). Every film in the trilogy had a different cinematographer, hence the different styles are quite apparent. Which one if better, is in the end entirely subjective.
To me ESB and ROTJ cinematography styles feel much closer to each other than ANH.