Yes, but it's weird. It's particularly simple when your mean is $0,$ and from there you can just add whatever mean you want.
Start with a sample that has a mean of zero that is constructed as follows:
$$\mathbf{A} = (-a,-b,\alpha, \beta, a),$$
where $\alpha + \beta = b$. This ensures that the mean is zero.
Create another sample:
$$\mathbf{B} = (-a-\gamma,-b_1,\alpha_1, \beta_1, a+\gamma),$$
where $\alpha_1+\beta_1 = b_1$, and you may or may not choose $b\ne b_1$,
although you must have $\alpha\not=\alpha_1,$ and $\gamma$ is chosen so that the variance is the same. We would have the following equations to solve for $\gamma, b_1, \alpha_1,$ and $\beta_1:$
\begin{align*}
\alpha_1+\beta_1&=b_1\\
a^2+b^2+\alpha^2+\beta^2+a^2&=(a+\gamma)^2+b_1^2+\alpha_1^2+\beta_1^2+(a+\gamma)^2.
\end{align*}
Simplifying these equations yields
\begin{align*}
\alpha_1+\beta_1&=b_1\\
2a^2+b^2+\alpha^2+\beta^2&=2(a+\gamma)^2+b_1^2+\alpha_1^2+\beta_1^2\\
2a^2+b^2+\alpha^2+\beta^2&=2a^2+4a\gamma+2\gamma^2+(\alpha_1+\beta_1)^2+\alpha_1^2+\beta_1^2\\
b^2+\alpha^2+\beta^2&=4a\gamma+2\gamma^2+\alpha_1^2+2\alpha_1\beta_1+\beta_1^2+\alpha_1^2+\beta_1^2\\
b^2+\alpha^2+\beta^2&=4a\gamma+2\gamma^2+2\alpha_1^2+2\alpha_1\beta_1+2\beta_1^2.
\end{align*}
This is a single equation with three unknowns, each of which $(\gamma,\alpha_1,\beta_1)$ occurs quadratically. Therefore, you could simply choose two of them, and solve for the third using the quadratic formula.
An example:
\begin{align*}
\mathbf{A} &= (-1,-0.9,0.1,0.8,1)\\
\mathbf{B} &= (-1.058, -0.8, 0.05, 0.75, 1.0580)
\end{align*}
These two have the same mean (zero), different medians (0.1 and 0.05), and similar enough variances given the number of decimal places (I obtained these through MATLAB), although you can probably refine it if you work through the algebra.