invariant
has absolutely nothing to do with uniform buffers. invariant
means that if two separate shaders have the same input values and use the same expression to compute the invariant
-qualified output, then the output will be guaranteed to produce the same value in both shaders. Without that qualifier, such a guarantee does not exist.
invariant
has nothing to do will sharing "the data provided for various inputs". invariant
is about how the output is qualified and computed.
As for the rest of your question, no, OpenGL ES 2.0 has nothing similar to UBOs. You'll have to set different uniforms on different programs to the same value.