So I was playing around and I managed to recreate a situation that looks similar to your issue.
The problem is that I don't know how I did this. My theory was that the problem was related to the alphabetical order of the variable names. This image seemed to support that since the ZZZZ variable was correct but the AAAA one had 2 variables that did not get expanded.
So I next wanted to document the exact commands that created this. I deleted all of my test variables and rebooted to start clean.
Then I opened a Powershell prompt with "run as admin" so that I could update the registry. Powershell won't expand %variable-names% too.
I ran this.
reg.exe add 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' /v CUDA_AAAA /t REG_EXPAND_SZ /d '%CUDA_PATH_Test%\AAAA' /f
reg.exe add 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' /v CUDA_PATH_TEST /t REG_SZ /d 'C:\Temp\CUDA' /f
reg.exe add 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' /v CUDA_ZZZZ /t REG_EXPAND_SZ /d '%CUDA_PATH_TEST%\ZZZZ' /f
reg.exe add 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' /v ZZZZ_EXPAND_PATH_TEST /t REG_EXPAND_SZ /d '%CUDA_AAAA%;%CUDA_PATH_TEST%;%CUDA_ZZZZ%' /f
reg.exe add 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' /v AAAA_EXPAND_PATH_TEST /t REG_EXPAND_SZ /d '%CUDA_AAAA%;%CUDA_PATH_TEST%;%CUDA_ZZZZ%' /f
I did not reboot but just opened a command prompt. I found that cmd opened with "run as admin" could see the variables, but a "normal" cmd prompt did not.
That's when I noticed that my "recreation" was using a "normal" and not an elevated cmd prompt.
After I rebooted, the variables were then visible.
So..... when you "echo %EXPAND_PATH%", are you doing that from a "run as administrator" command prompt?
Is there a .bat file in the startup folder or in the Task Scheduler that recreates or defines any of these variables?