It depends on the reason
It depends on the reason why you had the extended period.
If it was due to academic failure (repeating courses, suspensions, ..etc) then yes that would impact your profile significantly.
If it was due to non-academic reasons (family circumstances, financial hardships, ..etc) then it wouldn't impact your chance much.
But let me tell you one important point here, your USMLE scores will significantly dilute any effects your medical school transcript and degrees have on your overall assessment.
So if you have great USMLE scores they wouldn't bother much about your extended stays at med school.