There are a coupe of things which impact image quality.
The two which are not camera dependent are:
Photographer/skill and Lighting
When it comes to the device, there are generally 3 things which impact it. Sensor size, lens quality and generation of the camera (newer ones are better).
The viewfinder type does not directly impact the image quality. The optical has advantages in sports and other things which involve fast panning or very fast objects. It also has an advantage in very low light since the EVF will break down in to mostly noise. The EVF has an advantage to those learning exposure as the EVF (mirrorless) will have a WYSIWYG (what you see is what you get) view. Meaning no need to guess what bumping the exposure another 2 stops does as you can see it. This of less use to experienced photographers as they will know their camera and can read the exposure meter in their optical viewfinder. Ultimately the real difference between EVF and optical is the photographer's comfort level with both. I use both, but I am much more comfortable with an optical and so I do a better job there.
Look at the system as a whole. Some have better tech (Sony), some have better lenses (Nikon and Canon), some have better weather sealing options (Nikon, Canon and Pentax (very few weather sealed Sony lenses but their higher end bodies are nicely sealed)), some have smaller sensors (lower quality image but allow for smaller lenses) such as Olympus and Panasonic, some are particularly good at video Panasonic's GH series stands out.
EVF vs optical is less of a concern than it was a few years ago. I would not let it be the only thing which guided my purchase.