A man has been left in a critical condition after he was attacked with chemicals on the street of a seaside town in Devon.