Molecular Cloud Formation in Shock-compressed Layers