An offshore magnitude 7.8 earthquake rocked the southern Philippines on Monday, killing at least 32 people.