I don't know how they find out. I presume they get a notification OR can check themselves periodically. When/if you get a judgment clearing you, you can send a copy or notice to IRCC.
I don't know about UCI#. Your spouse can certainly apply for a visitor's visa, no-one can tell you if it will...