One of the advisors at my school said that this is a route former students have done and succeeded in, with many more that haven't succeeded I'm sure. That being said, it is heavily dependent on a first time step 1 pass rate and a decent step 2 score. What the other school is also would have a bearing on outcomes. The gap and transfer is also going to need to be well described in your applications (if you have any extenuating circumstances, etc.). It is also a lot easier to explain yourself if you voluntarily withdrew at this juncture rather than having them academically dismiss you.
You also need to do some introspection as to why you were unable to pass comp and if you could realistically pass that other schools' comp and step 1.
If a school is letting you transfer without having to do preclincials and go straight to the exams, I'd say it could be worth a shot. Worst case scenario you don't pass the exam and withdraw from there with minimal financial losses (application fees, test fees). I wouldn't recommend starting over or applying somewhere that requires you to pay for a semester or whatever though.
If you do transfer, pass step 1 and step 2, you'd have to cast a nationwide net of most primary care programs and at the minimum dual apply FM/IM to several hundred programs. If your end goal was matching to a competitive speciality or a certain geographic area then I'd say that ship has unfortunately sailed. Even doing all this won't guarantee a match but I do understand that just letting go of the dream might be too hard for you at this point in time so ultimately it's up to you.
If you apply I'd limit myself to the obvious choices of Ross, AUC, SGU as well as the outlier schools I normally tell people to not bother with first time around being AUA, MUA, and UMHS. I'd steer clear of Trinity, Xavier, and SJSM or others. You can call them up and see which ones would take your transfer without repeating semesters and ones that won't require payment of tuition before starting clinicals.
The advisor also said that Western Atlantic, while a new school, was formed by many former Ross faculty and seems to be on a good track, take it with a massive grain of salt though.
Goodluck.