The rotation of the earth is not a to and fro motion which is essential condition for the SHM motion. Hence it is not a SHM motion.
This is a SHM motion as it is a periodic motion.
This is periodic motion which is in oscillatory motion and periodic about it’s lower mean position, hence it is called SHM motion.
The general vibration of the polyatomic molecule about its mean position is a periodic motion but not necessarily a SHM.