The moon is not a easy example body because it's gravitational field has significant higher multipoles, so I will answer for an idealized spherically symmetric body.
Your first issue is to recognize that—unless you intend to power the craft somewhere along the trajectory—you are constructing an orbit, and as such it has the usual features:
- It is elliptical (of semi-major axis $a$ and semi-minor axis $b$).
- It has the center of the body at one focus.
You want to go from one size of the spherically shaped body to the antipodes which means that you want to connect two points on the diameter of a circle around the same center.
We expect a whole family of such curves. We need a reason to prefer one over all the others. More on that later.
Now, the line perpendicular to the major axis and through a focus of a conic section is called the latus rectum. The length of the semi-latus-rectum of an ellipse is $\ell = \frac{b^2}{a}$. In this case $\ell = r$ where $r$ is the radius of the moon or planet, leading to $ar = b^2$ for orbits meeting our needs.
We might want to select the orbit with the lowest energy demand.
The energy needed $E$ is the difference between the energy of the orbit
$$ E(a) = -G\frac{Mm}{2a} \;,$$
and the potential energy of craft at rest on the surface
$$ U_0 = -G\frac{Mm}{r} \;.$$
We get
\begin{align}
E
&= E(a) - U_0 \\
&= GMm\left[ \frac{1}{r} - \frac{1}{2a} \right]\\
&= GMm\left[ \frac{a}{b^2} - \frac{1}{2a} \right] \;.
\end{align}
Minimizing with respect to $a$ we get
$$
0 = GMm\left[ \frac{1}{b^2} + \frac{1}{2a^2} \right] \;,
$$
which is only satisfied in the limit that $a$ and $b$ both are allowed to increase without bound. This represents a demonstration of what StephenG says: our lowest energy-demand orbit is, oddly enough, an escape trajectory meaning infinite time will be required, and making this option unfeasible for most purposes.
But this is a minimum meaning that any bound curve won't meet the requirements.
Discussion: Our calculation actually assumed we wanted to come down opposite the launching point relative the fixed stars. On a rotating body a we can aim at some other point relative the fixed stars by rigging our time-of-flight so that our target geography is where we land when we get there. For locations on the equator a straight-up and straight down trajectory will actually do the job, assuming you get the timing right.
Further discussion: This oddity might be seen as a problem for the designers of ballistic missile systems except that the missile don't accelerate instantaneously as (also) assumed here, but instead have a non-trivial boost phase. The height and down-range travel attained while boosting means that antipode-targeting remains an option.