A quick search online will pull up multiple vague sources citing that Shakespeare said this. However, one red flag is that all of these note a general "Shakespeare" reference, and not any specific work or context for the quote. This quote seems to have been passed around as Shakespearean, although it should actually be attributed to Oliver Wendell Holmes.
Holmes studied law at Harvard and then decided to practice medicine instead, studying that field at Harvard as well. He taught human anatomy at Dartmouth and then at Harvard. Additionally, Holmes became known as a poet. He began writing "Breakfast-Table" papers and contributing those to The Atlantic Monthly, which feature both his intelligence and humorous style. Holmes was a man of diverse talents.
Holmes's actual quote is "Nothing is so common-place as the wish to be remarkable," meaning that most people dream of greatness. Few people actually achieve a lasting legacy, of course. By juxtaposing the ideas of "common" and "remarkable," Holmes highlights the difficulty in achieving greatness. For to be common is to be average and not remarkable at all.