one would expect the doctor to retire
The meanings are as follows but the words in bold need not be said/written, as they are implied in the tense of the verb
-
After spending so many years working in hospitals, one would expect the doctor to have already retired.
-
After spending so many years working in hospitals, one would expect the doctor to retire at sometime between now and the near future."
Q2) What is the subject of "spending".
Spending does not have a clear subject because you have not given sufficient context.