Let n≥1 and A be a commutative algebra of the form k[x1,x2,…,xn]/I where k is a field of characteristic 0 and I⊆k[x1,x2,…,xn] is an ideal. Assume that there is a Poisson bracket {,} on S such that {I,S}⊆I and let us denote the induced bracket on A by {,} as well. It is well-known that [dxi,dxj]:=d{xi,xj} defines a Lie bracket on the A-module ΩA∣k of Kähler differentials making (A,ΩA∣k) a Lie-Rinehart pair. Recall that A is regular if and only if ΩA∣k is projective as an A-module. If A is not regular, the cotangent complex LA∣k may serve as a replacement for the A-module ΩA∣k. We prove that there is a structure of an L∞-algebroid on LA∣k, compatible with the Lie-Rinehart pair (A,ΩA∣k). The L∞-algebroid on LA∣k actually comes from a P∞-algebra structure on the resolvent of the morphism k[x1,x2,…,xn]→A. We identify examples when this L∞-algebroid simplifies to a dg Lie algebroid. For aesthetic reasons we concentrate on cases when k[x1,x2,…,xn] carries a (possibly nonstandard) Z≥0-grading and both I and {,} are homogeneous.