Be careful: the derivative of a function at a point $x$ is defined by $f'(x):=\lim_{h \to 0} \frac{f(x+h)-f(x)}{h}$ provided that the latter limit exists and is finite. It's different from what you said.
You cannot substitute $h=0$ because the difference ratio $\frac{f(x+h)-f(x)}{h}$ is not defined at $h=0$; this has nothing to do with limits or indeterminate forms, it is something that appears way before in the theory of functions.
We can evaluate limits at a point where a function is not defined (actually, they are the most interesting cases, for instance $\lim_{x \to 0} \frac{\sin x}{x}$), because limits are defined in the so called accumulation points. Accumulation points, intuitively, are points such that you can go as near as you want to them but never reach them. So, in limits, we exclude the value where the variable tends to; that is, in $\lim_{h \to 0} \frac{f(x+h)-f(x)}{h}$ we consider $h\ne 0$.
Technically, in general you can't say that when $h \to 0 $ it is $f(x+h)\to f(x)$ because this is true only if $f$ is continuous at $x$. Hence, the substitution $h=0$ to deduce something about the value of the limit you are referring to is a tool to evaluate the limit is only if you already know the continuity at $x$ of the functions involved under the limit sign. Even assuming that $f$ is continuous at $x$, you could say that indeed that the numerator $f(x+h)-f(x)$ tends to $0$ as $h \to 0$ and the denominator $h$ tends to $0$ as $h\to 0$, but this are only separated informations on the behavior of the numerator and the denominator. In general, you cannot deduce the behavior of the limit of a ratio by the behaviors single limits of the numerator and the denominator. You can only deduce something when you can apply the algebraic theorems of limit of ratio; and guess what? Those algebraic theorems I'm referring to apply when the famous cases of the indeterminate forms don't occur.
Hence, the point is that "indeterminate form" is just a shorthand that means: "We cannot deduce the limit of a function $F$ only knowing the behavior of the single limits of the functions $f_1,f_2,...,f_n$ involved in the limit of $F$". A priori, we don't know if it exists and it is finite or infinite, or if it doesn't exist; a deeper analysis must be done when an indeterminate form appears.
So, in the context of limit defining the derivative, you think as $h\ne0$ and you are interested in what happens when $h$ becomes arbitrarily small but it is never $0$. So, using your example $f(x)=x^2$, you have:
$$(x^2)'=\lim_{h \to 0}\frac{(x+h)^2-x^2}{h}=\lim_{h \to 0}\frac{2xh+h^2}{h}=\lim_{h \to 0}\left(2x\frac{h}{h}+\frac{h^2}{h}\right)$$
Here comes the important part about accumulation points. Since $h\ne 0$, the functions $h/h$ and $h^2/h$ are equivalent, respectively, to the functions $1$ and $h$ (if this seems strange to you, just think about this: $h/h$ and $h^2/h$ are not defined at $h=0$ because the division by $0$ is not defined, hence for $h=0$ their expressions are meaningless; but, if $h\ne0$, then for any $h\ne0$ the division between two real numbers is defined and if a factor appears both in the numerator and in the denominator you can cancel it out; $h$ in the numerators and it is different from $0$, so we can cancel it out in this case. I know this seems a delirium at first, but details are important in math). So, in the limit where $h\to0$, being $0$ an accumulation point we can write:
$$\lim_{h \to 0}\left(2x\frac{h}{h}+\frac{h^2}{h}\right)=\lim_{h\to 0}(2x+h)$$
Now, you can evaluate the latter limit with the definition as follows.
Let $\epsilon>0$, choose $\delta=\epsilon$. Hence $(|h|<\delta=\epsilon) \implies (|2x+h-(2x)|=|h|<\delta=\epsilon)$. So $\lim_{h \to 0} (2x+h)=2x$. As you've seen, no substitution of $h=0$ occurs at all in all this reasoning.