As Allen Hatcher answered, there is no space whose cohomology is a countable direct sum of $\mathbb{Z}$'s in a single degree, and the cohomology of a wedge of spheres is instead a product.
However, the version of the question raised in his answer is quite fun to play with: If $X$ is a simply-connected space such that $H^*(X)$ is given by $\prod_I \mathbb{Z}$ in a single degree, is $X$ equivalent to a wedge of spheres? I've just thought this through with Maxime Ramzi, and thought it'd be fun to share here.
Since the singular cochain complex is the dual of the singular chain complex, and wedges of spheres are detected by having free homology, the question directly reduces to the following: Let $C$ be a complex such that $\mathrm{RHom}(C,\mathbb{Z})$ has cohomology given by $\prod_I \mathbb{Z}$ concentrated in degree $0$. Is then $C$ equivalent to a free abelian group, concentrated in degree $0$?
We first argue that $\mathrm{RHom}(-,\mathbb{Z})$ detects equivalences. Passing to cofibers, we need to check that if $\mathrm{RHom}(D,\mathbb{Z})=0$, $D=0$. But indeed, either $D/p$ is nontrivial for some $p$, in which case $\mathrm{RHom}(D/p,\mathbb{Z})=0$ has $\mathrm{RHom}(\mathbb{F}_p,\mathbb{Z})\neq 0$ as retract (contradiction), or $D$ is uniquely $p$-divisible, in which case $\mathrm{RHom}(D,\mathbb{Z})=0$ has $\mathrm{RHom}(\mathbb{Q},\mathbb{Z})\neq 0$ as retract (again a contradiction).
Now observe that $C$ splits as sum of complexes $H_k(C)[k]$ (this is "formality of complexes over $\mathbb{Z}$"), and $\mathrm{RHom}(H_k(C)[k],\mathbb{Z})$ is concentrated in degrees $-k,-k-1$ since $\mathbb{Z}$ has projective dimension $1$. So by conservativity of $\mathrm{RHom}(-,\mathrm{Z})$, we see that $H_k(C)=0$ for $k\neq 0, -1$. We also see that $\mathrm{RHom}(H_{-1}(C),\mathbb{Z})[1]$ and $\mathrm{RHom}(H_0(C),\mathbb{Z})$ are retracts of $\prod_I \mathbb{Z}$.
We next show that $H_{-1}(C)$ must be zero. Assume it is nonzero, then also $\mathrm{RHom}(H_{-1}(C),\mathbb{Z})[1]$ must be nonzero by conservativity of the derived dual. This is a retract of $\prod_I\mathbb{Z}$, which we name $E$. For a nonzero element $e\in E$, the gcd of its coordinates in $E\subseteq \prod_I \mathbb{Z}$ is some integer. If it is greater than $1$, we may divide $e$ by it, and since $\prod_I \mathbb{Z} / E$ is also torsion free, this element $\frac{e}{\gcd}$ is also contained in $E$. So we may assume that the gcd is $1$. Since this means that there is a finite linear combination of coordinates which is $1$, we find a map $\prod_I \mathbb{Z} \to \mathbb{Z}$ taking $e\mapsto 1$, proving that $E$ admits $\mathbb{Z}$ as a retract. But then
$$
\mathrm{RHom}(\mathbb{Q} \otimes H_{-1}(C)[-1], \mathbb{Z}) = \mathrm{RHom}(\mathbb{Q}, \mathrm{RHom}(H_{-1}(C)[-1], \mathbb{Z}))
$$
admits $\mathrm{RHom}(\mathbb{Q},\mathbb{Z})$ as retract, which is nontrivial in degree $-1$. On the other hand, $\mathbb{Q}\otimes H_{-1}(C)[-1]$ is a sum of copies of $\mathbb{Q}$ concentrated in degree $-1$, so the left hand side of the display equation is concentrated in degree $0$, contradiction. So $H_{-1}(C)=0$.
We have therefore reduced to the case where $C$ is concentrated in degree $0$, i.e. given by an ordinary abelian group $A=H_0(C)$. We have a canonical "double dual map"
$$
A \to \mathrm{RHom}(\mathrm{RHom}(A,\mathbb{Z}),\mathbb{Z}) = \mathrm{RHom}(\prod_I\mathbb{Z}, \mathbb{Z}).
$$
As discussed in the edit to the answer at Is the dual of the product of infinite cyclic groups a free abelian group ?, $\mathrm{Hom}(\prod_I \mathbb{Z},\mathbb{Z})$ is a free abelian group. So the image of the double dual map above on $H_0$ is a subgroup of a free abelian group, in particular it is itself free. $A$ therefore splits into $A=K\oplus F$, with $F$ free and $K$ the kernel of the double dual map. $K$ is now an abelian group such that $\mathrm{RHom}(K,\mathbb{Z})$ is a retract of $\prod_I \mathbb{Z}$ (in particular discrete), and such that the double dual map is zero. But since the dual is discrete, this really means that the underived double dual map $K\to \mathrm{Hom}(\mathrm{Hom}(K,\mathbb{Z}),\mathbb{Z})$ is zero, i.e. that $\varphi(k)=0$ for every $k\in K$ and every $\varphi: K\to \mathbb{Z}$. Since a nonzero homomorphism has to be nonzero on some element, this shows that $\mathrm{Hom}(K,\mathbb{Z})=0$, thus that $\mathrm{RHom}(K,\mathbb{Z})=0$, and again using conservativity of the derived dual, that $K=0$. So $A=F$ is free as desired.
This proves that a simply-connected $X$ with cohomology $H^k(X)=\prod_I \mathbb{Z}$ is equivalent to some wedge of spheres. One remaining question is whether it actually agrees with the obvious such wedge, $\bigoplus_I S^n$, in the canonical way. This is equivalent to answering the following question: For two free abelian groups $A,B$, and an isomorphism $\mathrm{Hom}(B,\mathbb{Z})\cong \mathrm{Hom}(A,\mathbb{Z})$, must it necessarily be the dual of an isomorphism between $A$ and $B$? In the countable case, $A$ and $B$ agree with their (underived!) double dual, and one can go back. In general, the double dual of a free abelian group is again free, but possibly on a larger base, depending on the existence of measurable cardinals (this is explained in the question/answer linked above). So the question is whether automorphisms of $\prod_I \mathbb{Z}$ can interchange the expected basis elements of the double dual $\mathrm{Hom}(\prod_I\mathbb{Z},\mathbb{Z})$ with the exotic ones (corresponding to countably complete ultrafilters on the indexing set).