This is an error I've seen many times here in the forums, and over time the suspicion has grown that this is due to installing and re-installing with some random cleanup in between. Your post confirms that feeling. (Most of the time when people do this is because the initial attempt to install fail.)
I would guess that you have been able to achieve some mismatch with the installer cache.
What you should have done is to simply install Express Edition. You can have multiple instances of SQL Server installed, so there is no direct need to uninstall the instance running Developer Edition. And if you absolutely did not want to keep it, you should just have uninstalled without deleting folders or registry entries. At least, the few times I have uninstalled and re-installed, this is what I have done and it has worked.
You could have a look at this article: https://www.sql-easy.com/learn/how-to-uninstall-sql-server/ Some posters have been able to resolve their situation with help of it, but I have not followed it myself.