Can someone ever be accused of self-plagiarism after the course is over? I submitted a philosophy essay to a professor for his 2nd year class that was almost the same as an essay I submitted to a TA for the same professor's 1st year class.

I thought that I had authorization from my professor but I recently discovered that I needed permission in writing. It's been almost 4 years now and I graduated last year...can I get in trouble for this/get my degree revoked? Would the university have kept a record of my assignments from both first and second year? Would this written permission only be submitted between the student and the professor or does the university keep the letter/email on record?

Any info on the types of penalties that could result from this would also be appreciated.

Thanks in advance for any insight.
In theory, you could get in trouble for this, but the risk is very low.  Universities generally retain the authority to change grades and revoke degrees forever, at least when matters of academic dishonesty are involved.

However, nobody is likely to be looking over your old work to find this.  It probably doesn't even exist in recorded form any more.  So I see little cause to concern yourself, especially if this was a product of a misunderstanding.