You sure can. I have the latest version running on a newer MacBook Pro and can download and install on my trusty 2012 27" iMac. I am using Mac OS 10.14. I think it will run MacOS 10.15 but I hate the newer Music App over iTunes. The version I can use on the older computer is Logic 10.5.
Just purchase Logic on your 2020 iMac. Now go to your older iMac
Open App Store. Login if you haven't. Select your account on the bottom left. Look for Logic Pro on your purchases. Do not click on Logic Pro itself. Click on the download symbol. It will bring up some message asking if you want to download the last compatible version. Click download and you should be good to go.