Let $K$ be an imaginary quadratic field. Is there always a finite field $k$ and an elliptic curve $E$ such that the endomorphism algebra $\mathrm{End}_{\overline k}(E) \otimes \Bbb Q$ is isomorphic to $K$ ?
A refined question would be whether any order $O \subset K$ is isomorphic to $End(E)$ of some $E$ ?
(The analogue for $K=\Bbb Q$ is discussed here:Is the ring of integers of any imaginary quadratic field equal to $\mathrm{End}(E)$ for some $E / \Bbb Q$?)
I know that $E$ should be ordinary in that case (the supersingular case is known due to Deuring correspondence).
One idea would be to take some $E / \Bbb C$ with CM by $K$, it is then defined over some number field $L$, and then find a prime ideal $Q$ of $O_L$ so that $End(E) \cong End(E \times_{O_L} O_L / Q)$...
Yes, from Serge Lang's book Elliptic Functions theorem 13.4.12 (Deuring) says the following:
So it suffices to take a prime integer $q$ that splits in $O_K$ (not necessarily in $O_L$ !) such that $q$ doesn't divide the conductor of the order $End(E) \subset O_K$ (there exist infinitely many such $q$ by Cebotarev, or Frobenius theorem... !), then the reduction of the curve $E / L$ mod $Q$ (where $Q$ is any prime above $q$) has the same endomorphism ring as $E$.
I guess that any order $O \subset O_K$ can be $End(E)$ for some $E$ over a number field (take a suitable complex torus... then CM theory tells us it is defined over $\overline{\Bbb Q}$). But of course, over a given finite field $k$, there are only finitely many possible $End(E)$ for $E/k$. But what about $E / \overline k$ (e.g. this includes all maximal orders in the quaternion algebra $Q_{p, \infty}$ by Deuring)?
Then I guess we have the following: an order $O$ in an imaginary quadratic field $K$ is the endomorphism ring of some $E / \overline{\Bbb F_p}$ iff the conductor of $O$ is coprime to $p$ (i.e. $O = \Bbb Z + f O_K$ for $gcd(f,p)=1$) and $p$ splits in $K$.
One direction was just proved. The other uses Deuring lifting theorem (13.5.14 in Lang), and combined with part i) of thm 12 above.