The HLSL shader language is used in DirectX family APIs and GLSL for the OpenGL family APIs. This means that the choice of graphics API will limit the shader language as well, so if cross platform is a concern then GLSL will be the choice. However, this comes with some caveats as well.
One difference is that in OpenGL the shading language is compiled on driver level, this means that the binary representation is not stable and can change with driver updates. In HLSL it is compiled to a hardware independent representation that can be used on multiple GPUs. This should really be a problem for writing shaders, but it sometimes means that certain things work different with other drivers and especially operating systems.
Another thing to take note is that OpenGL features extensions, these can be enabled inside GLSL to utilize extra functionality. With newer OpenGL versions some of these extensions might be added to the core profile. Vendors then have to implement these extensions to be compliant, which sometimes results in things working different. The HLSL shading language syntax only changes with new introduction of DirectX APIs.
Some syntactic differences are that HLSL can use #include, in GLSL this is not default. When searching for GLSL tutorials you might find different syntax, because it has changed quite a lot as of OpenGL 3 and 4. GLSL shaders have a void main() as shader entry point. In HLSL this entry point can be named and have input (vertex data) and output (pixel shader input).
Learning either of these will introduce you to some common ground which will make it easy to learn to other one. HLSL is more standardized, but it also only works on a single operating system. There are also other attempts of shader languages that compile to both OpenGL and DirectX, one example is Cg which is deprecated by now. Many game engines (Unity, Unreal Engine) also have their own flavors, but their syntax is like HLSL or GLSL.
As already mentioned Vulkan will introduce an open intermediate language representation called Spir-V. This means that if a language can be compiled to this representation it can be used to write shaders.