We consider an initial and boundary value problem for a nonlinear Volterra integrodifferential equation. This equation governs the evolution of a pair of state variables, $u$ and $\vartheta$, which are mutually related by a maximal monotone graph $\gamma$ in ${{\Bbb R}}\times{{\Bbb R}}.$ The model can be viewed, for instance, as a generalized Stefan problem within the theory of heat conduction in materials with memory. Besides, it can be used for describing some diffusion processes in fractured media. The relation defined by $\gamma$ is properly interpreted and generalized in terms of a subdifferential operator associated with $\gamma$ and acting from $H^1(\Omega)$ to its dual space. Then, the generalized problem is formulated as an abstract Cauchy problem for a perturbation of a nonlinear semigroup, and existence and uniqueness of a solution $(u,\vartheta)$ can be proved via a fixed-point argument whatever the maximal monotone graph $\gamma$ is. Moreover, the meaning of $\gamma$ as a pointwise relationship is recovered almost everywhere, in the case when $\gamma$ is bounded on bounded subsets of ${{\Bbb R}}$. Finally, under some other restrictions on $\gamma$, the longtime behavior of the solution is investigated, in a more specific context related to the generalized Stefan problem.