Very easy using Array:
b = {2, 3, 7, 11}; (*base*)
lengths = {3, 2, 2, 4} (*dimensions*)
cbegin = ConstantArray[0, Length[lengths]];
Array[Times @@ (b^{##}) &, lengths+1, cbegin]
giving back:
Out[] =
{{{{1,11,121,1331,14641},{7,77,847,9317,102487},{49,539,5929,65219,717409}},{{3,33,363,3993,43923},{21,231,2541,27951,307461},{147,1617,17787,195657,2152227}},{{9,99,1089,11979,131769},{63,693,7623,83853,922383},{441,4851,53361,586971,6456681}}},{{{2,22,242,2662,29282},{14,154,1694,18634,204974},{98,1078,11858,130438,1434818}},{{6,66,726,7986,87846},{42,462,5082,55902,614922},{294,3234,35574,391314,4304454}},{{18,198,2178,23958,263538},{126,1386,15246,167706,1844766},{882,9702,106722,1173942,12913362}}},{{{4,44,484,5324,58564},{28,308,3388,37268,409948},{196,2156,23716,260876,2869636}},{{12,132,1452,15972,175692},{84,924,10164,111804,1229844},{588,6468,71148,782628,8608908}},{{36,396,4356,47916,527076},{252,2772,30492,335412,3689532},{1764,19404,213444,2347884,25826724}}},{{{8,88,968,10648,117128},{56,616,6776,74536,819896},{392,4312,47432,521752,5739272}},{{24,264,2904,31944,351384},{168,1848,20328,223608,2459688},{1176,12936,142296,1565256,17217816}},{{72,792,8712,95832,1054152},{504,5544,60984,670824,7379064},{3528,38808,426888,4695768,51653448}}}}
output has dimensions 4*3*3*5.