Sharkbites are not sized for galvanized pipe. The diameters are different. You need threads.Can pex be fitted to galvanized pipe via a straight sharkbite coupling?
You need a threaded end on the galvy for that application.There will be a very small galvanic current which will very slowly cause the galvanized pipe to corrode. Shark bites do come in threaded applications so that pex can be joined to galvy. Knowing the risks, I would have very little concern about doing this and would expect it to last years.