learning, knowledge, school
斈 centers on acquiring knowledge through study: learning, gaining knowledge, and the place where that happens—school.
斈 is a variant form of 学. It combines 文 (writing, literature) with 子 (child), suggesting a child learning letters or written knowledge.
A child (子) under a roof of writing (文) is learning and gaining knowledge at school.
For ガク, imagine a child at school learning to say 'gak' as they discover new knowledge: gak -> ガク.