You've covered most of the pros and cons, but I have a couple of thoughts and questions for you.
1. Med school + residency will take (on average) 8-10 years. So you'd be around 40 when you start earning a salary, but you'd still have a lot of debt to pay off. You'd also have to endure residency's long hours, which are bad enough for a 25 year old, but they'd be even worse for a near 40 year old.
2. Work life benefits from each will be similar. You won't have work to do at home if you're a doctor, but big tech companies are very reasonable with their hours. If you're relatively advanced in your career, there also are people who "rest and vest" who sit around and don't do much, but still get paid.
3. Salary will be similar. You don't know what specialty you'd go into, and there are only a couple of specialties that average >$500k per year. On the other hand, especially if you're at a F(M)AANG or similar company, you'll be paid similarly, and be paid that for 8 years more. Also, you will get stock which will appreciate. While I think the "golden age" of very wealthy ~35 year old tech workers has passed for this cycle due to stock already having appreciated a lot (nearly 10 times in a 10 year period), stock grants consistently seem to increase in value at approximately 20% per year which beats market returns by a lot. You can also help people by donating/volunteering, since you'll be making a very nice salary.
4. Exit opportunities - if you're a doctor, you pretty much have to keep working in the medical field. If you're a SWE, you can work as a SWE, but you also can do tech consulting and similar fields if you're getting close to retirement - so you can keep mentally engaged without the stress of a full time job.
to me the choice is clear, but it's your decision