In my game, my archaeologist got near a barbarian caravel and disappeared. At the same time, one archaeologist appeared in the original city. So am I getting it right that archaeologists immediately return to the original city after being attacked by barbarians?
No, archaeologists cannot be killed. If stepped on by an enemy unit, they get teleported to their home city. In that regard, the behave much like great people in that the only way to get rid of them is to use up their charges.
To protect your archaeologists, accompany them with a military unit, preferably a fast combat unit such as light or heavy cavalry.