Poor Mary to receive such censure. I have always felt bad for her the neglected Bennet child. Mrs.Bennet favors Lydia and Mr.Bennet favors Lizzy. Everyone loves Jane and one can assume that Kitty gains attention by following Lydia. So Mary being neither a favorite child nor pretty does the one thing she can to gain attention she accomplishes. IMO because of all this studying yes she does spout "pompous nonsense" but that's because that is what she has learnt from her self-teaching and because she really doesn't know better. Accomplishment is what she feels will get her attention. And she is willing to do anything to get the praise she needs.
"listened to with much more pleasure, though not playing half so well; and Mary, at the end of a long concerto, was glad to purchase praise and gratitude by Scotch and Irish airs, at the request of her younger sisters, who, with some of the Lucases, and two or three officers, joined eagerly in dancing at one end of the room. "