How does maximum speed vary with altitude?
This question isn't clear because "speed" means different things to different people, and this is also engine specific.  Every aircraft will have a different speed vs altitude profile.  In general...

Mach will go up, as you increase in altitude.  This is because the lower density air lowers the speed of sound (in an absolute sense).

True airspeed will go up as you maintain a constant indicated airspeed.  Conversely, maintaining a constant true airspeed will increase your indicated airspeed as you descend.

Normally, a jetliner should not be seeing true air speed at sea level.  For jetliners, even if your engines are good enough to get you there, the aircraft has an indicated airspeed structural limit that keeps you from accelerating.  You can keep the same speed (at structural limit) through higher altitude, which increases your TAS.

There is a chart here which should help show the relationships between altitude and speed:

A simplified chart for determining Mach number and true airspeed from airspeed-indicator readings: