Again, this is not a problem, if the markeyplace is free. There is no definition of "quality" other than what the buyers demand. The quality will be exactly what the consumers demand it be.
If the people who buy the product want and are willing to pay for a higher quality product someone will produce and sell it to them. If the quality of the product deteriorates because of "cheap foreign labor", and the consumers continue to buy it and do not demand a different product, then the quality was, in fact, too high in the first place.