  We investigate, using numerical simulations and analytical arguments, a
simple one dimensional model for the swelling or the collapse of a closed
polymer chain of size N, representing the dynamical evolution of a polymer in a
\Theta-solvent that is rapidly changed into a good solvent (swelling) or a bad
solvent (collapse). In the case of swelling, the density profile for
intermediate times is parabolic and expands in space as t^{1/3}, as predicted
by a Flory-like continuum theory. The dynamics slows down after a time \propto
N^2 when the chain becomes stretched, and the polymer gets stuck in metastable
`zig-zag' configurations, from which it escapes through thermal activation. The
size of the polymer in the final stages is found to grow as \sqrt{\ln t}. In
the case of collapse, the chain very quickly (after a time of order unity)
breaks up into clusters of monomers (`pearls'). The evolution of the chain then
proceeds through a slow growth of the size of these metastable clusters, again
evolving as the logarithm of time. We enumerate the total number of metastable
states as a function of the extension of the chain, and deduce from this
computation that the radius of the chain should decrease as 1/\ln(\ln t). We
compute the total number of metastable states with a given value of the energy,
and find that the complexity is non zero for arbitrary low energies. We also
obtain the distribution of cluster sizes, that we compare to simple
`cut-in-two' coalescence models. Finally, we determine the aging properties of
the dynamical structure. The subaging behaviour that we find is attributed to
the tail of the distribution at small cluster sizes, corresponding to
anomalously `fast' clusters (as compared to the average). We argue that this
mechanism for subaging might hold in other slowly coarsening systems.
