Yes, not only good old Rawls, but many contemporary writers make arguments about the limits of meritocracy. Some books I can recommend:
Robert H. Frank: Success and Luck: Good Fortune and the Myth of Meritocracy
https://press.princeton.edu/books/hardcover/9780691167404/su...
https://blogs.lse.ac.uk/lsereviewofbooks/2016/06/28/book-rev...
Michael Sandel: The Tyranny of Merit: What’s Become of the Common Good?
https://www.nytimes.com/2020/09/15/books/review/the-tyranny-...
In general, I tend to agree with Rawls that this notion of 'deserving' is irrelevant to the question of how we ought to distribute goods/welfare in society.