Several view layers

The checkbox is per view layer, exactly like Blender's own passes. Tick it on each view layer that should carry the pass; the panel lists the others that already have it.

Colours are shared across view layers, since they belong to the materials. Switching the pass off on one view layer removes its AOV; the shader nodes are only stripped once no view layer anywhere wants the pass.

Several view layers · Material ID · Fulford