- 5k/month -> 60k/year sounds reasonable in general. You might be able to get more, but honestly I don't think that's a bad salary for programming position. Tax sounds about right.
- 24 days of leave seems on the low side of things. I'd expect 28-30 OR more pay. I had 30 in Germany.
- 1500 for the relocation seems low as well. What are you supposed to pay for with that? Flight is covered by the company? What about housing (usually you have 1-2 month of rent to deposit, that might eat a large chunk of this amount already)?
Can't comment on the neighborhood or the current cost of living situation in Berlin, but I feel that I'd stay in Dubai if I were in your shoes. You earn quite a lot of money for later - 12*4k + 5k means that you basically nearly save all the money Germany offers before taxes. You are happy at your company. You fly home for free - no idea how expensive flights between Dubai and Pakistan are, for me this is quite expensive (Singapore -> Germany).
Let me turn this question around: What is it that you _like_ about the offer? Just getting out of "Can never stay forever" Dubai/a different tech zone alone or is the job/location itself interesting?