All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
The chain of narrators of this hadeeth is weak as it includes Hamzah ibn Abu Muhammad Al-Madani, about whom Al-Mizzi said in the book Tahtheeb Al-Kamaal fi Asmaa’ Ar-Rijaal, "Abu Zur’ah said, 'He is weak,' and Abu Haatim said, 'His narration is weak and objectionable; and only Haatim ibn Ismaa’eel narrated from him.'"
The scholars differed in opinion about the interpretation of the verse, but some verifying scholars and interpreters of the Quran favored the view that was narrated from Ibn Abbaas about this hadeeth. Among these scholars are At-Tabari, Ibn 'Attiyah, Ibn Katheer and Ash-Shinqeeti. At-Tabari said:
"The closest to the truth among these views is the view of those who said that the verse: {Have those who disbelieved not considered that the heavens and the earth were a joined entity.} [Quran 21:30] means one mass without water or vegetation, then we separated the heaven with rain, and the earth with vegetation. We said this to be more correct regarding the meaning of the verse because the saying of Allaah that followed {and We made from water every living thing} [Quran 21:30] means that Allaah, The Exalted, did not describe the water with this description [i.e. that from it Allaah made every living thing] except with the reason for it mentioned right before it."
The meaning of the hadeeth is clear, which is that when Allaah wanted to populate the earth by creating the human beings who would inhabit it, He brought out of it vegetation; this is Allaah separating it, and then He sent down rain from the sky, this is like His saying: {And after that He spread the earth. He extracted from it its water and its pasture. And the mountains He set firmly. As provision for you and your grazing livestock.} [Quran 30:35]
As for your question 'If there was no rain except after living beings were created for the earth, then how did the plants survive?', then this suggests that you think that the plants existed on the earth before the existence of human beings and animals, this is a matter that we have no knowledge of, but the Quran indicates that the plants are fed with rain in many verses; Allaah says (what means): {[More precisely], is He [not best] Who created the heavens and the earth and sent down for you rain from the sky, causing to grow thereby gardens of joyful beauty which you could not [otherwise] have grown the trees thereof? Is there a deity with Allaah? [No], but they are a people who ascribe equals [to Him].} [Quran 27:60]
Allaah also says (what means): {And it is He Who sends the winds as good tidings before His mercy until, when they have carried heavy rainclouds, We drive them to a dead land and We send down rain therein and bring forth thereby [some] of all the fruits. Thus will We bring forth the dead; perhaps you may be reminded.} [Quran 7:57]
In another verse, Allaah says: {Have they not seen that We drive the water [in clouds] to barren land and bring forth thereby crops from which their livestock eat and [they] themselves? Then do they not see?} [Quran 32:27]
Another verse reads (what means) : {And We have sent down blessed rain from the sky and made grow thereby gardens and grain from the harvest. And lofty palm trees having fruit arranged in layers - As provision for the servants.} [Quran 50:9-11]
Allaah knows best.