If you have never heard of Medium, it is a publishing platform that launched in 2012. Paid members can clap when they like an article and the writer receives a payment from a pool. Medium publishes high quality content, therefore it is a solid backlink, however, many question the site's staying power.
Repeated layoffs and changes to the terms have left writers confused and hesitant to concentrate on the platform because it may be gone soon. It may be good for backlink diversity, it you are targeting blogs by guest posting, however, guest posting is not the best way to build backlinks. If it is your business model, then a private blog, not on Medium, is better for a quality backlink if it has a following and publishes high quality content.
Many SEO experts would be quick to point out that if you are creating guest posts with affiliate links in them, it looks spammy. A guest post should have a link to a website. The website can have affiliate links on it, but when you put an affiliate link in a guest post, it brings the host down. Besides, affiliate marketing works by pre-selling a lead, which is difficult to do in a guest post. Blogs that accept guest posts want content that their readers would find useful, not a sales pitch. As for Medium, their blogs are usually high quality; it is hard to imagine that the blog owner would want to accept a post with an affiliate link in it, even if it was their own affiliate link.
Search engines like to see backlinks from blogs, but they also want to see links from social media and websites as well. A backlink portfolio that contains only links from guest posts looks suspicious. Google does not like anything that looks suspicious.