In this paper, we explore a family of exact solutions to the Einstein field equations (EFEs) describing a spherically symmetric, static distribution of fluid spheres with pressure anisotropy in the setting of embedding class one spacetime continuum. A detailed theoretical analysis of this class of solutions for compact stars PSR J16142230, Her X-1, LMC X-4 and 4U 1538-52 is carried out. The solutions are verified by examining various physical aspects, viz., anisotropy, gravitational redshift, causality condition, equilibrium (TOV-equation), stable static criterion and energy conditions, in connection to their cogency. Due to the well-behaved nature of the solutions for a large range of positive real [Formula: see text] values, we develop models of above stellar objects and discuss their behavior with graphical representations of the class of solutions of the first two objects extensively. The solutions studied by Fuloria [Astrophys. Space Sci. 362, 217 (2017)] for [Formula: see text] and Tamta and Fuloria [Mod. Phys. Lett. A 34, 2050001 (2019), https://doi.org/10.1142/S0217732320500017 ] for [Formula: see text] are particular cases of our generalized solution.