Compact embeddings, eigenvalue problems, and subelliptic Brezis–Nirenberg equations involving singularity on stratified Lie groups