Bitrate from file size
Bitrate for a target size is size in bits divided by duration in seconds. Fitting ten minutes into 500 MB needs about 6,990 kbps total, including audio, so around 6,700 kbps of video with 320 kbps of audio.
How to hit a target file size
Hitting a size target reliably needs two-pass encoding. A single pass has to guess how to allocate bits before it has seen the footage, and typically overshoots or undershoots by several per cent. Two-pass analyses the whole file first, then distributes the available bits toward the complex sections. For upload limits like Discord or an email attachment, that difference is the difference between a file that fits and one that needs re-encoding.
Questions
It depends on length. Ten minutes into 25 MB is about 350 kbps total, which will look poor above 480p.
Two, whenever you have a size target. One pass has to guess and usually misses by several per cent.
Yes. The figure here is total; take your audio bitrate off it to get the video allowance.
Container overhead and encoder variance. Leave one or two per cent of margin.
Only by cutting resolution or length. Below about 0.05 bits per pixel the result stops being watchable.