The fact that you didn't inform HMRC of your move away from the UK should not be a problem if and when you return unless you left owing tax. It has never been compulsory to inform HMRC of a move abroad. The fact is you have been non-UK resident since 1995 under the old rules and the new rules for UK tax residency which came into effect on 6 April 2013. You can read about those here
If you return to the UK before you sell your properties, you will have to pay Capital Gains Tax in the UK on any gains you make and the calculation of those gains will be based on the original purchase price unless they were bought before 31 March 1982, not the value when you return to the UK. To take a belt and braces approach, you really should wait until the sales of your Dubai property have completed before you return to the UK permanently.
The tax year of your return to the UK will be split into two periods, a period of non-UK residence starting on 6 April and ending on the day you are deemed to have became tax resident in the UK and the period from that day to the end of the tax year on 5 April. See paragraphs 5.26 to 5.46 in section 5 of RDR3 here
The number of days that you can spend in the UK between 6 April in the tax year of your return to the UK and the date of your deemed return to the UK will be limited in accordance with Table F on page 60 of RDR3 here
. You should also refer to the section "Arrivers" here
which explains how the number of days you can spend in the UK are linked to ties to the UK. Fail this test and you will be resident for the whole tax year and your gains will be taxable in the UK even if you were not in the UK for much of the early part of the tax year when you sold the property. Again, a belt and braces approach would be to not visit the UK at all between 6 April in the tax year of your return and when you actually return permanently.
You have some leeway on your main residence. If you sold that after your return to the UK, provided it has been your main home for the entire period of ownership and the last 18 months if you were not living in it, any gain will be tax free in the UK.
I hope this helps but let me know if you have any further questions.