  A first goal of this paper is to precisely relate the homotopy theories of
bialgebras and $E_2$-algebras. For this, we construct a conservative and fully
faithful $\infty$-functor from pointed conilpotent homotopy bialgebras to
augmented $E_2$-algebras which consists in an appropriate "cobar" construction.
Then we prove that the (derived) formal moduli problem of homotopy bialgebras
structures on a bialgebra is equivalent to the (derived) formal moduli problem
of $E_2$-algebra structures on this "cobar" construction. We show consequently
that the $E_3$-algebra structure on the higher Hochschild complex of this cobar
construction, given by the solution to the higher Deligne conjecture, controls
the deformation theory of this bialgebra. This implies the existence of an
$E_3$-structure on the deformation complex of a dg bialgebra, solving a
long-standing conjecture of Gerstenhaber-Schack. On this basis we solve a
long-standing conjecture of Kontsevich, by proving the $E_3$-formality of the
deformation complex of the symmetric bialgebra. This provides as a corollary a
new proof of Etingof-Kazdhan deformation quantization of Lie bialgebras which
extends to homotopy dg Lie bialgebras and is independent from the choice of an
associator. Along the way, we establish new general results of independent
interest about the deformation theory of algebraic structures, which shed a new
light on various deformation complexes and cohomology theories studied in the
literature.
