If you're getting paid by views or reads (as is the case on Medium or your own ad-supported blog), then eyeballs are what matter in terms of money. But yes, algorithms like engagement and so when they see there's engagement in a story, they'll find more eyeballs for you. So engagement does ultimately also matter for your income.
And no, shitty writing doesn't earn engagement as a general rule. If your writing is literally shitty and doesn't cross a minimum bar of quality, then just putting out a lot of it won't do you any good.
Hope that clarifies things, Nancy :-)