Here is an example with CW complexes rather than simplicial complexes. I doubt that there is an important difference, although the simplicial case will require more bookkeeping.
Take $K=\mathbb{R}P^3$ and $Y=\mathbb{R}P^2$. We can give $K$ a CW structure with skeleta $\mathbb{R}P^k$ for $0\leq k\leq 3$. Let $f^1:\mathbb{R}P^1\to Y$ be the evident inclusion. Clearly this extends over $K^2$. Any Now suppose we have an extension $f^3:K^3=K\to Y$ of $f^1$ would be nontrivial on. This will then give a graded ring homomorphism $H^1(Y;\mathbb{Z}/2)$$(f^3)^*:H^*(Y;\mathbb{Z}/2)\to H^*(K;\mathbb{Z}/2)$, but this is impossibleor in other words $(f^3)^*:(\mathbb{Z}/2)[y]/y^3\to (\mathbb{Z}/2)[x]/x^4$. Because $f^3$ extends $f^1$ we must have $(f^3)^*(y)=x$. This gives a contradiction because the generator of $H^1(Y;\mathbb{Z}/2)$ cubes to zero,$y^3=0$ but the generator of $H^1(K;\mathbb{Z}/2)$ does not$x^3\neq 0$.