That's because the inside of a raw egg is soft, and the inside of a raw potato is hard. Boiling water brings them both to a similar texture.
Edit: Not to mention that the inside of an egg is mainly protein, while the inside of a potato is mainly starch and cell membranes. Heat causes proteins to tighten, and causes starches and cell membranes to break down.
The effects of the environment on each of these things have everything to do with what the things are.