Whats wrong with this argument that $\operatorname{Spec}(\prod A_i) = \bigsqcup\operatorname{Spec}(A_i)$ infinite product. We have the spec functor $\text{CRng}^\text{op} \rightarrow \text{Aff}$.$\DeclareMathOperator{\Spec}{Spec}\DeclareMathOperator{\Hom}{Hom}$
Then  $$\Hom _{\text{Aff}}(\Spec(\lim A_i), \Spec B) = \Hom_{\text{CRng}} (B, \lim A_i) $$
$$ = \lim \Hom_{\text{CRng}} (B,A_i) = \lim\Hom_{\text{Aff}}(\Spec A_i, \Spec B) 
$$
$$ =  \Hom_{\text{Aff}}(\text{colim} \Spec(A_i), \Spec B) $$
This means $\Spec(\lim A_i)$ and $\text{colim} \Spec(A_i)$ both represent the same object.
But this clearly does not make sense when the colimit is infinite. What went wrong?
 A: The equality $\operatorname{Spec}(\prod A_i) = \bigsqcup\operatorname{Spec}(A_i)$ is always false in the category of schemes if the set of indices $i$ is infinite and all the $A_i$ are $\neq 0$.
Indeed $\operatorname{Spec}(\prod A_i)$ is quasi-compact (like any  $\operatorname{Spec})$, whereas $\bigsqcup\operatorname{Spec}(A_i)$ is never quasi-compact.
NB As quite judiciously commented by @Zhen Lin, the coproduct of affine schemes is different in the category of schemes from the coproduct in the category of affine schemes (which I have never seen used in algebraic geometry).
A: The very last step is wrong.
The thing is that given a scheme $X$, the functor $B \longmapsto \mathrm{Hom}(X,\mathrm{Spec}\,B)$ does not characterize $X$. Indeed, that functor depends only on the ring of global sections of $X$ (so, for instance, it is the same for the spectrum of a field and $\mathbb{P}^1$ of the same field).
So instead of showing equality for your two schemes, you just proved they had the same global sections – something you could have done anyway.
