Recurrent neuronal networks are known to be endowed with fading (short-term) memory, whereas long-term memory is usually considered to be hard-wired in the network connectivity via Hebbian learning, for instance. Here, we use the neuronal network of the roundworm C. elegans to show that recurrent architectures in living organisms can exhibit long-term memory without relying on specific hard-wired modules. We applied a genetic algorithm, using a binary genome that encodes for inhibitory-excitatory connectivity, to solve the unconstrained optimization problem of fitting the experimentally observed dynamics of the worm's neuronal network. Our results show that the network operates in a complex chaotic regime, as measured by the permutation entropy. In that complex regime, the response of the system to repeated presentations of a time-varying stimulus reveals a consistent behavior that can be interpreted as long-term memory. This memory is soft-wired, since it does not require structural changes in the network connectivity, but relies only on the system dynamics for encoding.