Verb for attending a lecture without registering

I don't know exactly what you mean by "lecture" (I recall that there is a difference between British and American English), but if you attend a class without formally registering or paying for it, in America we typically say that you are "auditing" it.

Reference: https://www.merriam-webster.com/dictionary/audit