Neither allopathic (MD) nor osteopathic (DO) medical schools allow grade replacement, even if your college does. You are required to report both the replaced grade and the original grade. Both will be included in all GPA calculations.
Both AMCAS (MD) and AACOMAS (DO) will look at 2 GPAs–one cumulative and one for sciences. AMCAS. considers bio, chem, physics and math for science; AACOMAS excludes math but may include some of your engineering courses. Your science GPA is the more important of the 2.
As an engineering major, it’s going to be difficult to move the needle on your science GPA because you have already have so many science credits.
Before I get any further–what exactly do you dislike about engineering? Other than being a childhood dream, what attracts you to medicine? Adcomms will ask you about why you switched careers and you need a really good answer. They will want reassurance that you are running TOWARD medicine and not AWAY from engineering.
Have you shadowed any physicians? Done any clinical volunteering where you can observed the day-to-day of medicine and interact with patients and their families?
If not, then that you should be your first step. You need to see first hand what medicine is about and make sure this isn’t some fantasy or idealization of what you think medicine is/should be.
Since you are currently a senior, you should graduate and get a job. Shadow and volunteer at a hospital, hospice, nursing home or public clinic, get involved in community service w/ the disadvantaged while working full or part-time. If, after a year or more of volunteering, the desire to go into medicine is still there, then you can enroll in a formal or DIY grade enhancing post-bacc. 30+ credits of excellent grades in UL biology and chem classes, coupled with a strong MCAT score will ease any academic concerns adcomms have about your weak undergrad academics.
This plan has two benefits: it puts space between you and your current less than wonderful grades and it gives you the time to complete the expected pre-med ECs (shadowing, clinical volunteering, community service, leadership roles in your ECs) Your ECs are just as important as your GPA for med school admission. A 4.0 GPA + no/weak ECs = rejection just as surely as a 3.0 GPA = rejection.
I know this is not the answer you are hoping for, but this is your surest–and likely only-- path to medical school.
Medical school admission requires a marathon, not a sprint. You need to be in it for the long haul.
Would you consider another healthcare field? There a dozens of options, and many would require less time for academic rehabilitation and have shorter training than med school.