I'm not sure I fully understand the outcome you are trying to achieve. Why would you like to write out the intermediate results after each batch?As far as I understand your use case, you care about getting the relevant records out of Mongo in parallel (which is achieved via your map task that extracts the relevant records for a key range), and then you have an RDD[Record] that you can do further operations on (e.g. groupBy, reduce and get out a final result that you can write out to HDFS if you wish). Is this a fair interpretation?
The devs can step in here as they know more - but my understanding is that intermediate results will be spilled to disk where necessary (e.g. the shuffle phase before a reduce operation when doing reduceByKey) during a given workflow, in a similar manner to Hadoop. Again like Hadoop, these intermediate results (e.g. the equivalent of the map part-0000 files) will be cleaned up once the job is completed, and only the RDD that you call .saveAsTextFile on will be written to HDFS.
It could be that the OOM is happening at the reduce phase since that takes place on the master and if you have very large amounts of distinct values then you could be running into memory issues when merging all the map results