You have many values for both d and p? Do you want to solve it for all combinations of d and p?
Anyway, first, I would recognize that d and L are alwways combined in the same form, thus, we have d/L always. So first, substitute
X = d/L
Of course, once we know the value of X, we can always recover L, as:
L = d/X
Now your problem reduces to
p = -2*X^3 + 3*X^2
You could use a loop over all values of p, getting three roots for each value of p. Before we do even that however, do a plot.
ALWAYS PLOT EVERYTHING.
fun = @(X) -2*X.^3 + 3*X.^2;
See that I used the .^ operator there to avoid problems.
Because this is a cubic polynomial in X, you can think of your problem as having 3 real roots for X, whenever p is betweeen 0 and 1. For p larger than 1 or smaller than 0, the problem will have one real root and two complex roots.
polycoef = @(p) [-2 3 0 -p];
1.5 + 0i
-1.1111e-06 + 0.0018257i
-1.1111e-06 - 0.0018257i
So if p is just slightly less than zero as I predicted, we see a real root, but then always two complex conjugate complex roots. The same thing happens at p==1, where 3 real roots turn into a real and two complex roots as we go above p=1.
For p between 0 and 1 however, three real roots for X.
Again, if you then know the value of d, we can easily recover the value of L, as
L = d./X