Just use an Emission shader. This will emit the intensity of the surface without responding to any surrounding light sources so will produce a pure "unshaded" colour.
Related: Node for setting render colour, regardless of lighting
Have you tried going into the Render Properties > Film and ticked the box which says Transparent?
This will make the background of the render transparent so all you can see if the objects that you've added/created
Here is one way to have a single object with multiple materials that are selected by view layers.
Select the cube and change the data block link from data to object. You will have to reselect the material for the cube.
Duplicate the collection as linked.
Exclude the new collection from the default view layer.
Create a new view layer.
Swap the view ...