In this paper, we propose a cross-layer design, which optimizes the energy efficiency of a potential future 5G spectrum-sharing environment, in two sharing scenarios. In the first scenario, underlying sharing is considered. We propose and minimize a modified energy per good bit (MEPG) metric, with respect to the spectrum sharing user’s transmission power and media access frame length. The cellular users, legacy users, are protected by an outage probability constraint. To optimize the non-convex targeted problem, we utilize the generalized convexity theory and verify the problem’s strictly pseudoconvex structure. We also derive analytical expressions of the optimal resources. In the second scenario, we minimize a generalized MEPG function while considering a probabilistic activity of cellular users and its impact on the MEPG performance of the spectrum sharing users. Finally, we derive the associated optimal resource allocation of this problem. Selected numerical results show the improvement of the proposed system compared with other systems.