na-adjective
pedantic
Describes a person, attitude, or style that shows off knowledge in an overly academic or narrow way. Often carries a negative nuance of being unnecessarily detailed or formal.
彼の衒学的な説明は、かえってわかりにくかった。
His pedantic explanation was, on the contrary, hard to understand.
衒学的な態度をとらずに、もっと簡潔
Please speak more concisely without taking a pedantic attitude.
知識自慢 is a noun meaning 'boasting of one's knowledge', whereas 衒学的 is an adjective describing the pedantic quality itself.
From 衒学 (げんがく, 'pedantry') + 的 (てき, '-like'). The word 衒学 is derived from 衒 (to show off) and 学 (learning).