Multiplying together the first-degree factors for given roots will form an expanded polynomial. This is a natural fit with an "accumulator" design pattern in Prolog.
That is, we'll introduce an auxiliary argument to remember the product of factors "so far" dealt with. Once the list of specified roots has been emptied, then we will have the desired polynomial expansion:
/* polynomialFromListofRoots(ListofRoots,[1],Polynomial) */
polynomialFromListofRoots([ ],Poly,Poly).
polynomialFromListofRoots([R|Roots],Pnow,Poly) :-
polyMultiplyRootFactor(R,Pnow,Pnew),
polynomialFromListofRoots(Roots,Pnew,Poly).
/* polyMultiplyRootFactor(R,Poly,ProductXminusR) */
polyMultiplyRootFactor(R,Poly,Prod) :-
polyMultiplyRootFactorAux(R,0,Poly,Prod).
/* polyMultiplyRootFactorAux(R,Aux,Poly,Product) */
polyMultiplyRootFactorAux(R,A,[ ],[B]) :-
B is -R*A.
polyMultiplyRootFactorAux(R,A,[P|Ps],[RP|RPs]) :-
RP is P - R*A,
polyMultiplyRootFactorAux(R,P,Ps,RPs).
Using the example in the Question:
?- polynomialFromListofRoots([2,-1],[1],Poly).
Poly = [1, -1, -2]
yes
Note that this corrects the output
claimed in the Question.