A strong earthquake off the southern Philippines killed at least two people, damaged a hospital and schools and prompted evacuations due to a possible tsunami.