It's going to take homework and work on your part to find a good AR that will fit your requirements on a budget and ensure it's gonna work every time- and it's going to cost more than $500. But the extra investment will more than pay for itself.
When legal, I've had self defense firearms in my home my entire life (I was not allowed firearms in the Air Force barracks or when stationed overseas). I've lived in big houses, small houses, apartments and a motorhome. The following recommendation is based on first hand experience.
My first recommendation would be a Colt 6933. With its 11.5" barrel, quality of build, proper gas porting and correct springs, the only refinement it needs is swapping out the H buffer for an H2. The 6933 fits your needs because it's reliable, durable, is a lot of fun to shoot and it's short length is handy in tight spaces. However, the 6933 is not a practical recommendation because of NFA requirements, cost and current lack of availability. So, the question is, can one have an AR with all the advantages of the Colt 6933 on a budget? The answer is, with a little effort, one can come surprisingly close.
This isn't an "off the shelf" solution, as some assembly is required, but I think it'll meet your requirements better than any turn key AR.
First get this upper from PSA-
https://palmettostatearmory.com/deals/ar-15-days.html
At $250 shipped complete with BCG, it's a great value and still only need two possibly three, upgrades- a Colt extractor spring for improved reliability and a Black River Tactical Covert Comp to send the muzzle blast down range away from the shooter. If the barrel is over gassed (which, being from PSA is a distinct possibility), it will need something to address that. Black River Tactical has a couple of simple and affordable solutions in the form of the EZ Tune gas tube and the Micro Port inserts. (I have no connection with BRT or PSA other than being a satisfied customer of both.)
Next, get this PSA lower for $180 plus shipping-
https://palmettostatearmory.com/psa-ar15-complete-stealth-classic-sba3-lower.html
This lower only needs two upgrades. First, take out the carbine buffer and banish it go the Box of Useless Parts and install an H2 buffer. All 5.56 ARs equipped with a carbine receiver extension should be fitted with an H2 buffer.
Next, get a Split Fix for the SBA3. The SBA3 is one of the best, if not THE best, seem brave on the market today. But it is significantly improved with the installation of a Split Fix strap. The Split Fix stiffens and protects the wings of the SBA3 and improves usability.
Normally, I advise shooting an AR before making any changes. But the changes I've suggested are based on shooting and experimenting with several ARs. Lightweight carbine buffers are too light, PSA extractor springs are inadequate to the job and the improvements the Split Fix brings to the SBA3 makes it well worth the money. You won't know if the barrel is overgassed until the gas port is measured or the AR is shot. (DO NOT make the mistake of using the ejection pie chart in an attempt to determine if your AR is overgassed. It will make you crazy.)
All you need to complete this AR is a rear sight, Sig Romeo 5, mag, ammo and a sling. For a flashlight mount, check into the offerings by Arisaka.
Based on my personal preferences, I would change to a Slimline handguard and BCM Gunfighter grip.
Based on your requirements and budget, you'd be hard pressed to come up with anything that suits your needs better.