The Meiji Restoration is a deeply complex historical event that involves issues of economics, agriculture, westernization, colonialism, as well as many secondary and tertiary influences. It’s really hard to say that it was the change in power dynamic of classes within the shogunate that led to the restoration more than other causes.
I assume your question is predicated on the idea that many samurai were displeased with the fact that although high in the 4 class system (士農工商 which is itself a Chinese inspired system) wealth and social influence increasingly landed in the hands of the shomin or merchant class, but please tell me if I am wrong.
In any case, if we do take the change in actual class power as one of the main catalysts the issue is mostly an economic one. The merchant class, nominally the lowest in the 士農工商 system, gained enormous wealth while samurai stipends generally did not increase leaving a massive gap between the two groups. You can see the social prominence of the growing merchant culture in the explosion of literature and print making about urban land commoner life rather than warfare in the Genroku period as one marker of this change. This disparity between rank and actual power certainly caused social disturbance, but again I would be very cautious to say that this “lead to” the Meiji Restoration.
I would put issues of colonization like the unequal treaties (like the SONOJOI movement), the combined historical hostility of Choshu and Satsuma towards the shogunate (you can throw Sakamoto Ryoma in here if you want since he somehow got that treaty signed) and tangible modernization and academics in things like Dutch studies 蘭学.