Using the following fact, we get infinitely many non-homotopic maps $f_k:S^{2n-1}\to S^n\vee S^n$.
Fact: $\pi_{2n-1}(S^n\vee S^n)$ contains a $\Bbb Z$-summand.
So we can consider the spaces $X_k=(S^n\vee S^n)\sqcup_{f_k}D^{2n}$. Of course they all have the same (co)homology groups, $\Bbb Z\oplus\Bbb Z$ in degree $n$ and $\Bbb Z$ in degree $2n$.
I want to show that $X_k\not\simeq X_j$ for $k\neq j$ using the cup product structure. (I know it can be done using homotopy groups, but I'm curious about an alternative solution)
For instance, $X_0=S^n\vee S^n\vee S^{2n}$ since $f_0$ is nullhomotopic. I also suspect that $f_1$ is the attaching map of the $2n$-cell of $S^n\times S^n$. Thus, in $X_1$ the cup of two degree $n$ generators is a generator in degree $2n$.
I would conjecture that in $X_k$ the cup of two degree $n$ generators is $k$-times a generator in degree $2n$. Is this true? How can I prove it?
Edit: The 'fact' comes about as follows: For all spaces $X,Y$ the LES of $(X\times Y, X\vee Y)$ splits to give iso's $$\pi_i(X\vee Y) \cong \pi_i(X\times Y) \oplus \pi_{i+1}(X\times Y, X\vee Y)$$
Specializing to $X=Y=S^n$, one can prove that there is an iso $\pi_{2n}(S^n\times S^n, S^n\vee S^n)\stackrel{\cong}{\to}\pi_{2n}(S^{2n})$ induced by the quotient map. Thus, $$\pi_{2n-1}(S^n\vee S^n)\cong \pi_{2n-1}(S^n\times S^n)\oplus \pi_{2n}(S^{2n}).$$ The map $f_k\in \pi_{2n-1}(S^n\vee S^n)$ is thus the image of a degree $k$ map $S^{2n}\to S^{2n}$ under the inclusion $\pi_{2n}(S^{2n})\hookrightarrow \pi_{2n-1}(S^n\vee S^n)$.
This doesn't directly address you question, but since you said you were interested, here you go:
There is an infinite family of simply connected closed manifolds having isomorphic homotopy, homology, and cohomology groups in all dimensions which are distinguished by their cohomology ring. The spaces are all $S^2$ bundles over $\mathbb{C}P^2\sharp \mathbb{C}P^2$.
To begin with, There is a $T^2$ action on $S^3\times S^3$ given by $(z,w)\ast(p,q) = (zwp, z^2 w q)$, where we think of $p,q$ as unit quaternions and $z$ and $w$ as unit complex numbers. This action is free and the quotient space $(S^3\times S^3)/T^2$ is diffeomorphic to $\mathbb{C}P^2\sharp \mathbb{C}P^2$, as shown in Totaro's paper "Cheeger manifolds and the classification of biquotients"
Now, consider the $T^2$ action on $S^2$ given by $(z,w) p = z^m w^n \,p\, \overline{z}^m \overline{w}^n$, where we are thinking of $S^2$ as the unit length purely imaginary quaternions.
Then we have a diagonal action of $T^2$ on $S^2\times (S^3\times S^3)$. Projection onto the second factor gives the quotient space $M_{m,n} = [S^2\times (S^3\times S^3)]/T^2$ the structure of a bundle over $\mathbb{C}P^2\sharp \mathbb{C}P^2$ with fiber $S^2$. Using this and the Gysin sequence, one can easily show the homology and cohomology groups of $M_{m,n}$ are isomorphic to those of $S^2\times S^2\times S^2$, independent of $m$ and $n$.
We also have a principal bundle $T^2\rightarrow S^2\times(S^3\times S^3)\rightarrow M_{m,n}$. Using the LES in homotopy groups associated to this, it follows that $\pi_k(M_{m,n}) \cong \pi_k(S^2\times S^2\times S^2)$ for all $k$.
Finally, in my thesis, I computed the ring structure. The cohomology ring of $M_{m,n}$ is given by $\mathbb{Z}[u,v,w]/I$ where $I$ is the ideal generated by $u^2 + 2uv$, $uv + v^2$ and $muw + nvw + w^2$.
Then one can show that the number $m^2 + (m-n)^2$ is an invariant of the cohomology ring. In fact, I proved that $H^\ast(M_{m,n})\cong H^\ast(M_{m',n'})$ iff $m^2 + (m-n)^2 = m'^2 + (m'-n')^2$ and both $m-m'$ and $n-n'$ are even.