The notion of hidden symmetry algebra used in the context of exactly solvable systems (typically a non semisimple Lie algebra) is re-examined from the purely algebraic way, analyzing subspaces of commuting polynomials that generate finite-dimensional quadratic algebras. By construction, these algebras do not depend on the choice of realizations by vector fields of the underlying Lie algebra, allowing to propose a new approach to analyze polynomial algebras as those subspaces in an enveloping algebra that commute with a given algebraic Hamiltonian. These polynomial algebras play an important role in context of superintegrability, but are still poorly understood from an algebraic point of view. Among the main results, we present polynomial quadratic algebras of dimensions 4, 5, 6 and 8, as well as cubic algebras of dimensions 3 and 5, and various Abelian algebras, all of dimension 3. Basing on the observation how superintegrability is associated with exact solvability, we propose a procedure that connects the underlying Lie algebra with algebraic integrals of motion. As the integrals constructed in such way are now independent on the realization, alternative choices of realizations can provide new explicit models with the same symmetry algebra. In this paper, we consider examples of such equivalent Hamiltonians in terms of differential operators for the three cases and connected to the underlying Lie algebra gl(2, R) ⋉ R 2 ⊕ T1 as well as to the maximal parabolic subalgebra of gl(3, R). We also point out differences between the enveloping algebra of Lie algebras and the enveloping algebra of the related differential operators realization.