SEE THE EDITS BELOW
The answer is basically: fibrations equivalent to trivial bundles. (Dylan Wilson speculated about this in the [comments (https://mathoverflow.net/questions/453780/which-maps-of-topological-spaces-have-the-right-lifting-property-with-respect-to#comment1174152_453780).) But I am not sure what exactly I should mean by "basically", or "equivalent".
As I pointed out in a comment, $p$ must be a (Hurewicz) fibration because $A\times 0$ is a retract of $A\times I$ for every space $A$.
Suppose that $p:X\to Y$ has the RLP w.r.t. all split monomorphisms, and assume that $Y$ is path-connected. Let $y\in Y$ be a point. Let $F\subset X$ be the fiber over $y$.
The injection $i:F\to F\times Y$ given by $f\mapsto (f,y)$ is a split monomorphism. Define $u:F\to X$ by inclusion, and define $v:F\times Y\to Y$ by projection. Note that both $p\circ u$ and $v\circ i$ are the constant map at $y$.
A solution $w:F\times Y\to X$ of the lifting problem is a map, over $Y$, between the trivial bundle $F\times Y\to Y$ and the fibration $p:X\to Y$, such that on the fiber over $y$ it is the identity map of $F$. Therefore over every point in $Y$ the map of fibers is a homotopy equivalence, and therefore the map $F\times Y\to X$ is a homotopy equivalence.
EDITED: Here is a definite characterization of maps having the RLP w.r.t. all split monomorphisms: they are the retracts of trivial fiber bundles. That is, $p:X\to Y$ has this property if and only if there exists some space $Z$ such that, in the category of all spaces over $Y$, $p$ is a retract of the product projection $Z\times Y\to Y$.
Proof of "if" direction: Any right lifting property is inherited by retracts and also by base change, so it is enough that $Z\times \ast$ has the RLP w.r.t. split monomorphisms. And in fact split monomorphisms are precisely the maps that have the LLP w.r.t. $Z\to \ast$ for every $Z$.
Proof of "only if" direction: Let $Z$ be $X$. The map $i:X\to X\times Y$ given by $i(x)=(x,p(x))$ has left inverse given by $(x,y)\mapsto x$, so it is split mono. We show that $X$, as a space over $Y$, is a retract of $X\times Y$, by producing a different left inverse for $i$, a map $w: X\times Y\to X$ that preserves the map to $Y$. For this we use that $p:X\to Y$ has the RLP w.r.t. $i:X\to X\times Y$:
Let $u:X\to X$ be the identity, and let $v:X\times Y\to Y$ be projection. Then $v\circ i=p=p\circ u$, so there exists $w$ such that $w\circ i=u$ and $p\circ w=v$.
QED
It seems funny that (as discussed in the first part of the answer) a retract of a trivial bundle should always be at least weakly fiberwise homotopy equivalent to another trivial bundle, as long as the base is path-connected. But it's true.
Specifying a retract of $Z\times Y$ (as a space over $Y$) means given a map $e:Z\times Y\to Z\times Y$ such that $e\circ e=e$ and such that the projection to $Y$ is preserved, in other words giving a family $e_y$ of idempotent self-maps of $Z$, parametrized by $Y$. (The fibers over $Y$ of) the image $E=e(Z\times Y)$ may be thought of as a family $F_y=e_y(Z)$ of retracts of $Z$ parametrized by $Y$. Fixing some $y_0\in Y$, we can map $F_{y_0}\times Y$ into $E$ by $e$, and this map of fibrations over $Y$ is a homeomorphism in the fiber over $y_0$ and so must be a weak equivalence in every fiber.
I informally think of this conclusion in the following way: The canonical map from the space of all idempotent self-maps of $Z$ to the space of all retracts of $Z$ is such that on each component it is homotopic to a constant map.
By the way, if $Y$ is discrete then a map $X\to Y$ has this RLP if and only if either all the fibers are empty or all the fibers are nonempty.
EDIT About the dual question: A map $A\to B$ of spaces has the LLP with respect to all split epimorphisms if and only if it is an open and closed embedding, i.e. iff it corresponds to a homeomorphism from $A$ to an open and closed subset of $B$. You can see this by using the evident split epimorphism $A\amalg B\to B$.