There is a question on the primary AMCAS application (question 19), in which you're asked if you have ever been the recipient of institutional action by your school for a conduct violation (most likely a crime). Many undergrad schools know rather quickly when a student has committed a crime. The student is usually dismissed immediately after the fact.
Also, i doubt med schools do background checks, but i assume they do upon giving the degree (according to requirements i've read on some med school sites, regarding 'good moral character'). (do any of you MS-IV's know about this?)
Thus, if you have a shady side, they'll find out sooner or later.
-raindodger