It would be a very sad day in the Pride Lands if Rafiki dies. Most likely, he would have completed his training for his apprentice, and the rituals performed at the presentations will continue. The only thing is that he doesn't really have an
official relative seen or mentioned in the movie universe, but he does have a nephew named
Nefu, who appeared in
The Lion King's Timon and Pumbaa and a comic. To go along with the mention of the series, Rafiki trains him as his apprentice, and of course, the name of the episode is titled, "Rafiki's Apprentice".
It's your personal decision whether you consider the comics, books, or the television series in the same universe as the films. However, nevertheless, someone will have to take the mantle, and continue Rafiki's practices.
As for how Rafiki became the shaman of the Pride Lands, the only origin story (that I know of) of this is in "A Tale of Two Brothers" of
TLK: Six New Adventures. In the story, Rafiki travels from a distant land, and wanders into the Pride Lands. There, he becomes very close friends with Ahadi and Mufasa, and Ahadi appoints him to be the teacher to the monarchs of Pride Rock. Again, it's your personal decision to accept this story into your fanfiction.