First of all, socialism is generally talking about non market based mechanisms, where everything market based is derided as a compromise.
A non market based system would then mean there is no usage of a market, meaning the entire system is devoid of exchanging with people outside of its all in one system. This means no buying drugs from private companies because that is using market mechanisms.
Medicare for all does not manufacture drugs within the government, it is a single insurance plan which everyone in a country is part of. This gives that one insurance plan MARKET POWER as a monopsony to lower drug prices. Since medicare for all purchases drugs on an open market, it is a market based solution to lower drug costs.
A monopsony is a market structure where there is only one buyer for a good or service. Monopsonies work by forcing suppliers to sell at a lower price point because of how their demand curve looks on the classic Marshallian supply and demand graph. This market structure increases consumption and lowers prices.
For this reason, medicare for all is a market based health care policy which only works because of supply and demand.