Sufficient Condition for $f\in L^{1}(\mathbb{R}^{d})$ to belong to $L^{2}(\mathbb{R}^{d})$ in terms of its Fourier coefficients 
Question. Let $\left\{\varphi_{j}\right\}$ be a complete orthonormal system for $L^{2}(\mathbb{R}^{d})$ such that each $\varphi_{j}\in C_{b}(\mathbb{R}^{d})$ (the space of continuous, bounded functions). Let $f\geq 0\in L^{1}(\mathbb{R}^{d})$ and suppose that
$$\sum_{j=1}^{\infty}\left|\langle{f,\varphi_{j}}\rangle\right|^{2}<\infty \tag{*}$$
Does it follow that $f\in L^{2}(\mathbb{R}^{d})$ and therefore $f=\sum_{j}\langle{f,\varphi_{j}}\rangle\varphi_{j}$?

This question is motivated by the one asked here by someone else, but for which I have offered a bounty. I am trying to consider a simpler version of the problem in the linked question. I've tried playing around with approximation arguments (i.e. construct a sequence $f_{n}\in L^{2}(\mathbb{R}^{d})$ which converges to $f$ in some sense) but I run into problems in trying to use (*) to control $\left\|f_{n}\right\|_{L^{2}}$. 
For instance, if we could produce a sequence $f_{n}\rightarrow f$ in $L^{1}(\mathbb{R}^{d})$ such that $\sup_{n}\left\|f_{n}\right\|_{L^{2}}<\infty$, then there would exist $g\in L^{2}(\mathbb{R}^{d})$ and a subsequence $f_{n_{k}}\rightarrow g$ weakly in $L^{2}(\mathbb{R}^{d})$. It then follows that $f=g\in L^{2}(\mathbb{R}^{d})$.
Any help would for this question, as well as the linked one, would be great.

Update: The question linked to appears to have answered negatively by David C. Ullrich.
 A: A function with this property does not have to be in $L^2$.
Let's first note the following lemma:

Lemma. Let $H$ be a separable Hilbert space and $E \subset H$ a dense linear subspace.  There exists a countable set $\{e_n\} \subset E$ which is an orthonormal basis for $H$.

Proof of lemma.  Since $H$ is separable, so is $E$.  Let $\{x_n\}$ be a countable dense subset of $E$, which therefore is also dense in $H$.  Apply Gram-Schmidt to get a sequence $\{e_n\}$ which is orthonormal and such that $e_n$ is a finite linear combination of $x_1, \dots, x_n$.  In particular $\{e_n\} \subset E$ and the linear span of $\{e_n\}$ contains all the $x_n$, so it is also dense in $H$.  Thus $\{e_n\}$ is an orthonormal basis for $H$. $\Box$
Take any $f \in L^1(\mathbb{R}) \setminus L^2(\mathbb{R})$.  I will produce an orthonormal basis $\varphi_n$ for $L^2$, contained in $C_b(\mathbb{R})$, for which $\sum_n \left|\int f \varphi_n\right|^2 < \infty$.  (To avoid confusion, I'll reserve the notation $\langle \cdot, \cdot \rangle$ for functions known to be in the Hilbert space $L^2$.)
To begin, pick any orthonormal basis $B$ for $L^2$ which is contained in $C_b(\mathbb{R})$.  (Such a basis exists by our lemma.)  Partition $B$ into two parts: let $B_0 = \left\{ e \in B : \int f e = 0\right\}$ and $B_1 = \left\{e \in B : \int fe \ne 0 \right\}$.  Letting $H_i$ be the closed linear span of $B_i$, we have a direct sum decomposition $L^2 = H_0 \oplus H_1$.  
Now it suffices to find a set $\{\varphi_n\} \subset C_b(\mathbb{R}) \cap H_1$ which is an orthonormal basis for $H_1$ and satisfies $\sum_n \left|\int f \varphi_n\right|^2 < \infty$, since then we can union this set with $B_0$ to get an orthonormal basis for $L^2$ having the desired properties.
Enumerate $B_1$ as $\{e_n\}$ and let $a_n = \int f e_n$.  By definition of $B_1$ we have $a_n \ne 0 $ for all $n$.  If it should happen that $\sum a_n^2 < \infty$ then we are done by taking $\varphi_n = e_n$.    So suppose that $\sum_n a_n^2 = \infty$.
Define a sequence $\psi_n$ by $\psi_n = a_{n+1} e_n - a_n e_{n+1}$.  We have $\psi_n \in C_b(\mathbb{R}) \cap H_1$, and moreover $\int f \psi_n = 0$.  Let $E$ be the linear span of $\{\psi_n\}$ (i.e. all finite linear combinations of the $\psi_n$); note that $E \subset C_b(\mathbb{R}) \cap H_1$ and $\int f \psi = 0$ for all $\psi \in E$.  
Claim. $E$ is dense in $H_1$. 
Once the claim is proved, we can apply our lemma to get a set $\{\varphi_n\} \subset E$ which is an orthonormal basis for $H_1$.  We will then have $\int f \varphi_n = 0$ for all $n$ so that $\sum_n \left|\int f \varphi_n\right|^2 < \infty$ is certainly satisfied.
Proof of claim. Suppose $g \in H_1$ with $\langle g, \psi_n \rangle = 0$ for all $n$; we will show $g=0$.
Since  $\langle g, \psi_n \rangle = 0$ then by definition of $\psi_n$ we have $a_{n+1} \langle g, e_n \rangle = a_n \langle g, e_{n+1} \rangle$, or in other words $\langle g, e_{n+1} \rangle = \frac{a_{n+1}}{a_n} \langle g, e_n \rangle$ (recall that all the $a_n$ are nonzero).  By induction it follows that $\langle g, e_n \rangle = \frac{a_n}{a_1} \langle g, e_1 \rangle$.  
Now by Parseval's identity applied in $H_1$, we have
$$\infty > \|g_1\|^2_{L^2} = \sum_n |\langle g, e_n \rangle|^2 = \frac{|\langle g, e_1 \rangle|^2}{a_1^2} \sum_n a_n^2.$$
Since $\sum_n a_n^2 = \infty$ by assumption, this is only possible if $\langle g, e_1 \rangle = 0$.  This means  $\langle g, e_n \rangle = 0$ for all $n$, which implies $g=0$ since $\{e_n\}$ is a basis for $H_1$.
(A good warmup for this proof would be to show that in $\ell^2$, the set $E$ of all $h \in \ell^2$ such that $\sum_k h(k) = 0$ is dense.  Strategy: let $g \in E^\perp$.  Show by induction that $g(k) = g(1)$ for every $k$.  Conclude $g=0$.  Conclude $E^\perp = 0$ and hence $E$ is dense.)
