We study a finite system of diffusions on the half-line, absorbed when they hit zero, with a correlation effect that is controlled by the proportion of the processes that have been absorbed. As the number of processes in the system becomes large, the empirical measure of the population converges to the solution of a non-linear stochastic heat equation with Dirichlet boundary condition. The diffusion coefficients are allowed to have finitely many discontinuities (piecewise Lipschitz) and we prove pathwise uniqueness of solutions to the limiting stochastic PDE. As a corollary we obtain a representation of the limit as the unique solution to a stochastic McKean--Vlasov problem. Our techniques involve energy estimation in the dual of the first Sobolev space, which connects the regularity of solutions to their boundary behaviour, and tightness calculations in the Skorokhod M1 topology defined for distribution-valued processes, which exploits the monotonicity of the loss process L. The motivation for this model comes from the analysis of large portfolio credit problems in finance.