Average Bangladeshi is already richer than an average Pakistani. Go to this Credit-suisse report on Global wealth per adult report 2022, page 20 and 23. Adult Bangladeshis have both more GDP per adult and wealth per adult.
GDP per adult, 2021-
Bangladesh-$3,333
Pakistan-$2,366
Wealth per adult, 2021-
Bangladesh-$9,490
Pakistan-$6,237
Pakistan's wealth is heavily concentrated in DHA and Bahria towns. We don't have anything similar like those gated towns. In fact,most of the countries have not. Bangladesh looks more poorer than it should be because most of it's poor lives in the streets of Urban centers. Cities of Bangladesh provides plenty of jobs to the poorest segment of the society as a rickshaw puller, garments workers, street hawkers, vendors etc. Most of the rural poor have migrated to urban centers in Bangladesh in the last 30 years. This rate of migration is much more than India and Pakistan. 30-40 years ago, Bangladesh had much lower urbanization rate than those two countries, but now it has overtaken both of them.
Free and open access to global development data
data.worldbank.org
This means, Bangladesh provided much better upward mobilty to it's rural poor than those two countries. This along with poor or non-existant urban planning and inadequate transport infrastructure created chaotic and over crowded situations in major cities in Bangladesh.