I'll try to use as much of what you've done as I can.
You want to know that $\overline{Y_i} \subsetneq \overline{Y_{i+1}}$. Can I find points in the latter but not the former? Yes; I claim the points of $Y_{i+1} \setminus Y_i$ will work. Find me a closed set in $X$ that contains $Y_i$ but misses all of the points in this difference. You've already written one down.
Something you can prove in the same way is that if $S$ is a subset of $Y$ then $\operatorname{cl}_Y(S) = \operatorname{cl}_X(S) \cap Y$. That's comforting.
Your definition is incorrect. Here's the definition from page 5 of the text:
If $X$ is a topological space, we define the dimension of $X$ (denoted $\dim X$) to be the supremum of all integers $n$ such that there exists a chain $Z_0\subset\cdots\subset Z_n$ of distinct irreducible closed subsets of $X$.
The issue is you've stuck $X$ on the end and required $Z_n\subset X$ to be a proper inclusion, which is not correct.
Let's check the example you proposed doesn't actually contradict the exercise.
It's a quick check that the listed subsets form a topology: they contain the whole space, the empty set, and they're closed under finite unions and arbitrary intersections.
The irreducible subsets of $X$ are $\{1\}$, $\{2\}$, and $\{1,2,3\}$. Therefore $\{1\}\subset \{1,2,3\}$ is a chain of proper inclusions of nonempty irreducible subsets and there are no longer chains, showing that $\dim X=1$.
The nonempty closed subsets of $Y$ equipped with the induced topology are $\{1\}$, $\{2\}$, and $\{1,2\}$. The only irreducible closed subsets are $\{1\}$ and $\{2\}$, so $\dim Y=0$ and this is not a counterexample.
To show that exercise I.1.10(d) of Hartshorne is fine as written, here is one solution:
Let $Y\subset X$ where $X$ is irreducible, finite dimensional, and $Y\subset X$ is closed. By exercise I.1.10(a), $Y$ is also finite dimensional, so one can pick a chain of inclusions of irreducible closed subsets of $Y$ $Y_1\subset\cdots\subset Y_n$ demonstrating the dimension of $Y$. This chain of inclusions is also a chain of proper inclusions of irreducible closed subsets of $X$: since $Y$ is closed in $X$, the $Y_i$ are too; since the $Y_i$ have the induced topology, they're also irreducible subsets of $X$. Now look at the extended chain $Y_1\subset\cdots\subset Y_n\subset X$. From the assumptions that $\dim Y=\dim X$, we see that we must have $Y_n=X$ as $X$ is irreducible, and therefore $Y_n=Y=X$ as we have an inclusion $Y_n\subset Y\subset X$.
Best Answer
Yes we allow the case $Z_n$ being the whole space. If you think of a spectrum of an integral domain, then $Z_n$ is the whole spectrum and it corresponds to the zero ideal, which is prime in this case and therefore should be counted.
When the only irreducible subsets are points and the space itself then the dimension is $1$, not $0$. Note that in this case points are closed because closure of an irreducible subspace is also irreducible. I do not know an explicit example of such a space but for sure it must be T1 but neither sober (because the whole space is irreducible and has no generic point) nor Hausdorff for a Hausdorff spacs to be irreducible, it must be one-point space because if there are two points then there are two open subsets separating them, which is not possible because in an irreducible space, nonempty subsets intersect non-trivially.
P/s: thanks to a comment of RobArthan, an example for such spaces is any infinite set endowed with the cofinite topology.