An expression like
exampleVariable=10
does not really set the value of a variable. It creates a replacement rule. That distinction can usually be ignored, but it becomes important when you do
Subscript[example, Variable]=10
What you’re doing here is creating a replacement rule that is attached to the symbol Subsript.
I’m not really sure what your question is or what you’re trying to accomplish, so I don’t know what else to say.
You may try TagSet or TagSetDelayed:
example /: Subscript[example, variable] = 10
This way example will change color to black, because the assignment will be tied to example, not to Subscript.