What is wrong with the bad engine? Did it throw a rod or have bad bearings? bad oil rings? If it is only the head gasket and not anything to do with the bottom end, I would concentrate on fixing the head gasket. Toyota bearings are very durable and last a very long time if treated well (always had oil pressure and proper oiling). If it overheated and just needs a head gasket, don't touch the bearings if you don't need to. Compression and leak down tests will help test the rings
Motor swaps on a Corolla are pretty straight forward for an experienced Toyota/import shop. The labor itself is usually not a problem.
Is the engine you found a reman (remanufactured)? Does it come with any kind of warranty? Is it a used or junk yard engine? Is it a Japan engine? Hard to speculate about issues but there are a couple things to watch out for
It needs to be the same engine with the same emissions devices. You may need to remove the emissions off the old engine and use them on the 'new' one (for smog purposes). Also make sure the sensor connectors are the same otherwise you might. If it's just a long block (bottom end with head installed) you'll need to tear down the bad engine and swap everything anyway.
Kind of a lot to think about but I think diagnosing what is really wrong with the bad engine will help you choose the path that works most economically.