$\newcommand{\dd}{\mathrm{d}}$Let $\mathcal C$ be the category of modules over the polynomial ring $R = k[x,y]$, where $k$ has characteristic zero. Let $D = k[x,y]\langle 1,\xi,\eta,\xi\eta\rangle$ be the Koszul resolution of the $R$-module $k$, i.e. $\xi,\eta$ live in degree one with $\dd\xi = X,\dd\eta=y,\dd(\xi\eta) = x\eta - y\xi$. Then there is a $R$-linear chain map $f:D\to D[2]$ which in degree $2$ sends $\xi\eta\mapsto 1$. Its mapping cone defines a complex $C$ (with $n=4$ in your notation) whose cohomology is $k$ in degrees $0$ and $1$ (and zero elsewhere). I claim that there is no complex $C'$ whose cohomology is $k$ concentrated in degree $0$ such that there is a chain map $C'\to C$ inducing the identity on zeroth cohomology. Indeed, we may assume that $C'$ is the projective resolution $D$, and by design there is an exact triangle $D[1]\to C\to D\to D[2]$ such that the identity of $D$ gets sent to the map $f$ which represents a nonzero element of $\operatorname{Ext}_R(k,k)$, so that the identity does not lift to $C$.
This example does not satisfy your additional condition since the submodule of the homology is zero in degree one. However, we can just take the sum with another chain complex with nontrivial first cohomology to essentially get rid of this condition.
In general, given two complexes $C',C$ there is a spectral sequence with $E_2^{p,q} = \prod_{k}\operatorname{Ext}^q(H_{q+k}(C'),H_{k}(C))$ converging to $\mathcal D(C'[p+q],C)$ (the signs are probably wrong, I'll try to fix them when I have more time). You are asking whether the inclusion of the submodule of homology, which defines an element in bidegree $(0,0)$, survives to the $E_\infty$-page. The example above is essentially obtained by forcing it to be the source of a nonzero $\dd_2$.
However, since you haven't actually fixed the complex $C'$, there is considerable freedom in modifying the higher differentials in general.