Cotangent complexes of moduli spaces and Ginzburg dg algebras