No, they cannot. They were experiments done which indicated the possibility, but the results were never reproduced, therefore it is most likely their setup was somehow wrong. Moreover, no mechanism which could cause such effect is known.
Tracing the original experiment, I have found the following:
Investigations of the cellular bases of memory
In 1962 McConnell performed an experiment which appeared to be even more dramatic demonstration of this. After training some planaria he ground them up an fed them to other planaria. These animals were quicker at learning the light-shock association than controls who were fed ground-up untrained worms.
The claim is weaker here, only only they were quicker at learning, not learning everything.
Wikipedia on James V. McConnell says:
Although well publicized, his findings were not completely reproducible by other scientists and were therefore completely discredited (for review, see Chapouthier, 1973).
The maze question was asked at snopes forum, and the linked Everything2 topic seems a bit confused, giving the date of preceding 1953 experiment.
There is a comment to the topic there by dmd, agreeing with the Wikipedia negative conclusion:
In the interests of maintaining high scientific standards, I feel obligated to note that before the cold fusion debacle, McConnell's planaria study was the standard by which Bad Science was judged.
"McConnell's research program with planaria collapsed when other scientists failed to replicate the phenomenon of memory transfer." -- American Psychologist 51:589-598.
McConnell's results on transferred memories did not hold up. A great discussion of the failure of McConnell's research can be found in The Making of Memory: From Molecules to Mind by Steven Rose (1993, ISBN 0385471211).
It is also mentioned by C. Sagan in The Demon-Haunted World, ISBN: 978-0345409461, p. 221 as a known example of pseudoscience:
Typical offering of pseudoscience and superstition ... are ... "the aledged discovery that untrained flatworms can learn a task by eating the ground-up remains of other, better educated flatworms".
For completeness, here is a reference to the relevant original studies (copied from the everything2 page):
- McConnell, JV. 1962. Memory transfer through cannibalism in planarians. Journal of Neuropsychiatry 3 (Supplement no. 1): 542-548.
- Hartry, AL et al. 1964. Planaria: memory transfer through cannibalism re-examined. Science 146: 274-275.
If, as it seems, no one was able to reproduce it since then, it most likely means the theory is wrong.