Tunnels are actually pretty safe in earthquakes, Japan for example is criss crossed with them.
A tunnel is actually the least likely to shake; if you shake a jello with fruit inside it, the surface moves a lot but the interior fruit won’t move all that much.