Malta is not a city—it is an island nation (archipelago) in the central Mediterranean.
Valletta (founded 1566 by Knights Hospitaller after Great Siege) IS a fortified, walled city—and a UNESCO World Heritage Site (1980). Its massive bastions, curtains, cavaliers, and gates (City Gate, Victoria Gate) are intact. It's one of Europe's best-preserved Renaissance fortified cities.
So: Malta = country/archipelago. Valletta = walled capital city. Mdina = walled medieval city. The question conflates the nation with its historic urban cores.