Viewport-like uniform lighting for Eevee?

For example, if I stack two cubes and look it down in the Viewport, it looks like this. Uniform colours without lighting.

But if I use render it with Eevee, without any light, the scene is dark, and with a light, the colour on one object is not uniform:

Can I render with the uniform colour without lighting in Eevee?

What do you mean with uniform color?

You can use Workbench as render engine.

Using EEVEE, you can use a Sun a unique source of light.
A Sun is a big powerful distant light source. As a result, objects of scene are looking like their shading is similarly affected by it.

In your world settings change the color from the darker grey to a mid-grey .5
You might need to bump the strength to 2…then your render image will closely match the viewport render.