I have recently restarted playing minecraft; I googled around a bit and I found many websites which offer the server address for public servers. Is there any security risk to me joining one of these servers? If so, how can I minimize this risk?
You should try to play only on servers you can trust, which are mostly the big and famous ones. You can find a list of them here.
As said in the comments though, and as always on the internet, be wary of what you share with others, avoid at all costs sharing your password, IP address and such with anyone you don't know and trust.
The major issue is as the comments have mentioned: Someone else has your IP.
You don't necessarily need to tell your IP in the chat for others to know. All Minecraft server know what IP you are using to connect to it. You are basically disclosing your IP to people who have access to the "insides" of the server, or commands like
/dupeip from LiteBans whenever you join a server, though most restrict IP access to the administration or staff team.
Note that servers with GeoIP enabled (from plugins) can also disclose your rough location through a simple command.