Following are the category of leaves to remain in the UK that undocumented/ illegal/overstayer migrants can apply from within the UK:
If they are in a Genuine and Subsisting relationship with an EEA national, who is exercising treaty rights in the UK(working, studying, self sufficient, etc.) then can apply for the Unmarried Partner or Spouse/Civil Partner visa in the form of a Residence card
If they are the parent of an under 18 years old - British Child/Settled Child (child who has spent the first 7 years of their life in the UK) and they have a shared or sole responsibility for the child. They may or may not be in a relationship with the Child's other parent. They will need a confirmation from the other parent about their role in the child's upbringing
If they are in a Genuine and Subsisting relationship with a British national or Settled person and the couple have an under 18 years old - British Child/Settled Child (child who has spent the first 7 years of their life in the UK) and the couple together have a shared responsibility for the child, then they can apply for leave to remain as Unmarried Partner or Spouse/Civil Partner under the exception where EX.1 applies.