The problem of representability of quadratic functionals by sesquilinear forms is studied in this article in the setting of a module over an algebra that belongs to a certain class of complex Banach *-algebras with an approximate identity. That class includes C*-algebras as well as H*-algebras and their trace classes. Each quadratic functional acting on such a module can be represented by a unique sesquilinear form. That form generally takes values in a larger algebra than the given quadratic functional does. In some special cases, such as when the module is also a complex vector space compatible with the vector space of the underlying algebra, and when the quadratic functional is positive definite with values in a C*-algebra or in the trace class for an H*-algebra, the resulting sesquilinear form takes values in the same algebra. In particular, every normed module over a C*-algebra, or an H*-algebra, without nonzero commutative closed two-sided ideals is a pre-Hilbert module. Furthermore, the representation theorem for quadratic functionals acting on modules over standard operator algebras is also obtained.