I checked a few of my books.
The US Army History "Salerno to Cassino", page 167, describes the restoration of Naples after the Allies arrived and the Germans tried to destroy it with delayed mines:
“The task of restoration belonged to the 5th Army Base Section, which was redesignated at the end of October as the Peninsular Base Section. … Two engineer regiments, the 540th and 343rd, assisted by Italian laborers, cleared the streets of obstruction at more than two hundred separate location, mended breaks in the sewers at some 50 places and repaired the Napoleonic aqueduct, the major source of water for the city.
Index also lists:
540th Engineer Combat Regiment
540th Engineer Shore Battalion (Hmm? maybe that was an earlier name for of same unit?? It is mentioned early in the front of the book.)
The next volume, "Cassino to the Alps", doesn’t mention the 540th or the 334th or 344th.
Also, Reference “15th Army Group; Dec 1944- May 1945â€
Did not find any unit like that under the 5th Army or the II Corps nor the IV Corps. It appears that the 334th or 344th Engineers left Italy by then, just like the 540th Engineers.
Steve