Mechanisms of the Adsorption and Self-Assembly of Molecules with Polarized Functional Groups on Insulating Surfaces