Correct way to merge craft.user field arrays and use outside the loop?
It looks like you have a typo in your merge, and the structure of the merge is incorrect.

{% set merged = specialisms|merge(specialisms) %}


This is saying set merged to the array specialisms merged with itself. 

What I am guessing you want to do is merge each specialism into the merged array, which looks like this:

{% set merged = merged|merge(specialism) %}


Note that we are merging specialism and not specialisms (no s at the end). 

I'm not sure what data type specialism is, but if it isn't an array, you may need to wrap it in square brackets. This would become:

{% set merged = merged|merge([specialism]) %}


I hope this helps!