It's perhaps best to think of the difference between sport pilot self-certification, Basic Med, and an AME-issued medical certificate to be less about your medical qualifications, but the level of certainty that the FAA wants to have that you're safe to fly.
The FAA doesn't want anyone flying anything in any operation if they're unsafe to fly. Even a sport pilot has to self-certify on every flight that they do "Not know or have reason to know of any medical condition that would make that person unable to operate a light-sport aircraft in a safe manner." (FAR 61.23 c 2 iv).
That's the basic standard for any operation - don't be unsafe. What varies is what the FAA wants to go through to be sure you're not going to be unsafe:
- For exercising sport pilot privileges, they take your word for it as long as the state DMV hasn't revoked your license for some medical reason.
- For exercising privileges under Basic Med, they take your state licensed physician's word for it, combined with educating you on how to identify if you're a risk on a regular basis, but don't exercise any direct oversight over the examination your doctor provides.
- For non-commercial privileges as a private pilot, they require you to see a physician they've specially trained occasionally, and might want to personally review your medical records.
- To exercise commercial privileges, they want you to see the AME more frequently.
- To exercise the privileges of an ATP, they want you to see the AME even more frequently, and they want an EKG.
Once you've seen one of their specially trained doctors and that doctor (with their oversight) has been unable to determine you are safe to fly, the FAA won't let you self-certify or state-physician certify that you are until they've made sure of it themselves. It's a trust issue.
If you're actually safe to fly with whatever condition you have, in theory you can always get a medical -- almost anything is capable of getting a special issuance, but the cost and effort can be prohibitive. Conversely, if you're truly not safe to fly, you aren't really legal to do it under Basic Med or sport pilot either.
In practice, can you get a doctor to sign you off for Basic Med w/ conditions that would cause them to defer you for a medical? Almost certainly. Is this all a good system? No. Does it incentivize hiding medical conditions or avoiding treatment? Absolutely.