A magnitude 5.2 earthquake hit the coast of central Chile on Wednesday afternoon, the U.S. Geological Survey said.