Depending on where you get your rack from and the age of your snake you will probably be fine. There is a thin gap between the lips of the tubs and the top shelf of the rack. While a baby cornsnake can probably get out through that gap, an adult wouldn't. Nor would anything appropriate size be able to. It's not realy about friction, it's about weight.

Whie there are other safety measures you can take as drilling a hole to put a peg or something of that nature to where it would hit before sliding out. But you wouldn't really have to worry unless your corn snake is really small.

As far as keeping different species in the same rack, I know people that do without any issues, I personally wouldn't but it can be done. Some rack levels on a rack system can vary by a few degrees.