how long was it run in poor condition like this? the engine is probably fine.
head gasket repair is usually inexpensive parts-wise but expensive labor. so if you're doing it yourself it may not cost much. i have no idea what Kubota gaskets cost and what all you'll be doing. i'll defer to others on whether you should have a valve job done or not. i would go ahead and do it since it's all part but it's likely over kill - if the tractor was running fine before i'm inclined to say you don't need a valve job.
the major issue you could have is a cracked block. not sure how likely that is in the engine but my guess is you should be fine if you weren't beating the snot out of it....overheating multiple times, running it until it died, trying to run it some more...etc.
in general head gaskets can be fixed (i've done lots of head gaskets, but not a kubota). you'll want to familiarize yourself with head work though, it's a step up from normal home mechanic work in terms of tolerances and proper assembly/disassembly.
find a good machine shop to check, mill, and pressure test the heads. you could also call around and find a machine shop that will do the headgaskets for you if you're not up to it.
a manual is crucial. make sure you loosen and tigthen the head bolts properly, there is usually a specific sequence to them. this is crucial.
heads need to be milled...or technically you can resurface them yourself but only if you're very well versed in that kind of thing or know someone who is. the finish and flatness of the heads is critical to getting a good seal. it's actually cheap to mill heads anyway - i bet $40.
unless these folks recommend something else make sure you use a Kubota headgasket, this isn't a place to try and save a few dollars.
and when you're done with the motor, finish up properly. there's a really good chance that something caused the head gasket to blow - like a bad radiator or leak. make sure there's no leak and replace the radiator if it's bad. if the radiator is good clean it out good to make sure any oil residue is removed.
good luck.