No you don't give up rights. You own everything you write and publish. Medium has a setting where you can download all of your files at once as HTML files and there are tools for converting those html files into markdown.
https://www.npmjs.com/package/mediumexporter