Frost line in our area is generally about 3 feet down, so you have to trench that deep for water lines and such, but I don't know how deep the codes say foundations have to go. It may or may not be below the frost line.
For sheds here, in most towns and in some counties, you can theoretically get by without a foundation but sheds have to be "fastened down." Some people just twist ground anchors in and run a couple of cables over the roof, but the neighbors usually end up complaining about the ugly factor; so the "easiest" (?) is to slab and screw.
Putting something on railroad ties won't keep it off your neighbors' rooftops with some of our winds, so you'd still need the anchors.
Reports are that some people even use hurricane clips in their (wood frame) sheds, but the sellers have other names for them, and tell the customers "they make construction quicker" without telling them about any other benefits.