A rare earthquake of 3.4 magnitude shook northwest England late Wednesday, rattling homes and jolting many people out of their sleep.